SYSTEM WARNING: 'file_get_contents(https://www.clearos.com/?rendertype=json&get=header): failed to open stream: Connection refused' in '/var/www/virtual/newwrapper/cf_topmenu.inc' line 5

ClearOS Bug Tracker


View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000248ClearOSapp-users - User Managerpublic2011-03-18 00:022019-03-12 10:32
Reporterpazaan 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionsuspended 
PlatformOSOS Version
Product Version5.2-SP1 
Target VersionFixed in Version 
Summary0000248: Templatable default e-mail address
DescriptionCurrently, a user's e-mail address will default to username@domain (see api/User.class.php).

I would like to be able to implement a system whereby this can be changed. My specific requirement would be to change:
$ldap_object['mail'] = $this->username . "@" . $this->ldaph->GetDefaultDomain();
to:
$ldap_object['mail'] = preg_replace( '/[ \t\n]*/', '', strtolower( $ldap_object['givenName'] . "." . $ldap_object['sn'] ) ) . "@" . $this->ldaph->GetDefaultDomain();
but obviously something more flexible would be good.

I'm happy to code up this and submit it, but I would like some design direction. The easiest is just to have a combo box somewhere (Directory->Setup->Organization?) that has a simple bunch of options:
- Username
- first.last (spaces removed)
- somethingelse

A more generic way to do it is to implement some kind of templating system based on available LDAP fields, but this would get a lot more complex (and bug prone).
TagsNo tags attached.
Attached Files

- Relationships
related to 0000251closed Add user template 

-  Notes
(0000339)
user2
2011-03-18 10:40

This work is going on right now. The "mail" attribute is going to go back to be an editable field that should represent the user's primary e-mail address. Things like Kolab/Horde, Zarafa (?) and others latch on to "mail" and we need to get away from that if possible. If you tried changing the mail attribute on a 5.x system, there's a very good chance Horde/Kolab will break!

By the way, you will start to see more information on the LDAP design here:
http://www.clearfoundation.com/docs/developer/architecture/directory/ [^]
(0000340)
pazaan (reporter)
2011-03-20 17:13

Right. We're using SOGo, so Horde/Kolab breaking is not an issue for us. Is there an acceptable workaround for 5.x?
(0000341)
user2
2011-03-21 09:50

Well... just changing the code as described in the bug report is a workaround. I don't think I would try to do much more than that on a 5.2 system. If a 5.3 is ever released, we can see what kind of backporting can be done from 6.0.
(0000342)
user2
2011-03-21 09:50

Well... just changing the code as described in the bug report is a workaround. I don't think I would try to do much more than that on a 5.2 system. If a 5.3 is ever released, we can see what kind of backporting can be done from 6.0.
(0010961)
NickH (developer)
2019-03-12 10:32

Migrated to: https://gitlab.com/clearos/clearfoundation/app-users/issues/5 [^]

- Issue History
Date Modified Username Field Change
2011-03-18 00:02 pazaan New Issue
2011-03-18 10:32 user2 Assigned To => user2
2011-03-18 10:32 user2 Status new => confirmed
2011-03-18 10:32 user2 Target Version => 6.0
2011-03-18 10:40 user2 Note Added: 0000339
2011-03-18 10:47 user2 Relationship added related to 0000251
2011-03-20 17:13 pazaan Note Added: 0000340
2011-03-21 09:50 user2 Note Added: 0000341
2011-03-21 09:50 user2 Note Added: 0000342
2014-04-22 13:28 user2 Target Version 6 Future => Future
2015-05-25 05:10 user2 Target Version Future =>
2018-12-14 12:11 user2 Status confirmed => assigned
2018-12-14 12:11 user2 Assigned To user2 => tracker
2019-03-12 10:32 NickH Note Added: 0010961
2019-03-12 10:32 NickH Status assigned => closed
2019-03-12 10:32 NickH Assigned To tracker =>
2019-03-12 10:32 NickH Resolution open => suspended

SYSTEM WARNING: 'file_get_contents(https://www.clearos.com/?rendertype=json&get=footer): failed to open stream: Connection refused' in '/var/www/virtual/newwrapper/cf_footer.inc' line 7