> -----Original Message-----
> From: p dont think [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, 28 April 2004 3:55 PM
> To: Zoong Pham
> Cc: [EMAIL PROTECTED]
> Subject: Re: [SM-USERS] modified login name
>
>
> > I need to modify user login name in the front login page like this:
> > replace @ with __ (2 underscores)
> > replace . with _ (1 underscore).
> >
> > I look at src/login.php but don't know where to start.
> > I don't know PHP and really appreciate for any helps.
I am hosting multiple virtual domains with Sendmail (virtusertable) and
Dovecot for IMAP.
I want to modify the login name to have the it automatically changed (by
login.php) to
the real local account as specified in the virtusertable of Sendmail.
For example, the virtusertable looks like:
[EMAIL PROTECTED] client1__domain1_com
and end users just log in SM using [EMAIL PROTECTED] as login name and
password of
local account client1__domain1_com
I think it's a simple job but I don't know PHP. I read the PHP manual and
played
with the script src/login.php using str_replace() and $loginnam and
$loginname_value
like this:
$loginname = str_replace("@", "__", $loginname);
$loginname = str_replace(".", "_", $loginname);
$loginname_value = (sqGetGlobalVar('loginname', $loginname) ?
htmlspecialchars($loginname) : '');
But it doesn't change the loginname as I expected.
I modified functions/imap_general.php like this to confirm:
// logout_error( _("Unknown user or password incorrect.") );
logout_error( _("$username, $password") );
I also tried the virtusertable plug-in but it doesn't work either.
Still saying "Unknown user or password incorrect."
>
> You can use vlogin to do this, although you could argue that vlogin
> gives you a lot more than you need. You'd need to turn off all other
> vlogin functionality.
>
> http://www.squirrelmail.org/plugin_view.php?id=47
>
> It would also be quite easy to use the same approach that
> vlogin does to
> modifying the username. You could strip down vlogin to a
> mere few lines
> to do what you need.
Thanks for your suggestion.
I haven't tried vlogin. I thought it might be overkill for what I need.
If I can get either virtusertable or modifying src/login.php worked, I will
try
vlogin plugin.
Cheers,
Zoong
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
--
squirrelmail-users mailing list
List Address: [EMAIL PROTECTED]
List Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=2995
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users