Re: User name munging.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 19.05.2016 18:31, James B. Byrne wrote:

> I infer from this scant evidence that SM does not treat 'USERNAME' as
> 'username' for its own use.  Is there any way to force SM to munge
> mixedcase case USERNAMEs to lowercase?

I have done user name munging using a plugin that hooks into
'login_before' and accesses global $login_username:

// setup function
function squirrelmail_plugin_init_jni_prelogin()
{
   global $squirrelmail_plugin_hooks;

   $squirrelmail_plugin_hooks['login_before']['jni_prelogin']
      = 'jni_prelogin_login_before';
}

// hook function
function jni_prelogin_login_before() {
	global $login_username;

	$login_username = preg_replace('/@.*/', '', $login_username);
	$login_username = trim($login_username);
	$login_username = strtolower($login_username);
}

Regards, Juergen.

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
-----
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-users@xxxxxxxxxxxxxxxxxxxxx
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users



[Index of Archives]     [Video For Linux]     [Yosemite News]     [Yosemite Photos]     [gtk]     [KDE]     [Cyrus SASL]     [Gimp on Windows]     [Steve's Art]     [Webcams]

  Powered by Linux