Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Lite 7

 AfterLogic Forum : AfterLogic WebMail Lite 7
Subject Topic: Change email to username mapping Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
rick_ps
Newbie
Newbie


Joined: 20 July 2014
Online Status: Offline
Posts: 1
Posted: 20 July 2014 at 11:10pm | IP Logged Quote rick_ps

Hey Guys,

I have a pretty unique situation where the username doesn't match the first part of the email address. I've been looking at the Change email-to-username mapping on login plugin, but can't quite figure out what I need to do. It's installed but I'm not sure how to match it with the following situation:

For our email server, you must login with the username with a "cc_" prefix, so for example:

Username: cc_jane
Email Addresss: jane@domain.com

How can I enable our users to login with either a username OR an email address (but not require both). If I just login with the username, a correct email address isn't added to the account. Currently I'm requiring users to login with both their username and email address but it's a bit cumbersome.

Thank you!
Back to Top View rick_ps's Profile Search for other posts by rick_ps
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 21 July 2014 at 2:07am | IP Logged Quote Igor

You'll need to replace the main function of the plugin with:

Code:
     public function PluginIntegratorLoginToAccount(&$sEmail, &$sIncPassword, &$sIncLogin, &$sLanguage)
     {
               $sIncLogin = "cc_" . \MailSo\Base\Utils::GetAccountNameFromEmail($sEmail);
     }


As you can see, the method used there strips off the domain part with "@" character leaving just the username, and "cc_" bit will be prepended.

Hope this helps!

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide