> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> > > If I'm writing a plugin and I need to get hold of the currently
> logged in
> > > users email address, what methods do I have to get this?
> >
> > It's a global variable.  At the beginning of your function:
> >
> > function someplugin_init() {
> >    global $username;
> >    print "Hi $username. Ostriches run fast.<br>\n";
> > }
> >
> > Then you can use it throughout the function.
>
> So $username actually contains something like "[EMAIL PROTECTED]" ?

1. Check if $email_address is set.
2. Check if $username looks like email address
3. Use "[EMAIL PROTECTED]"

src/compose.php
function deliverMessage
...
if (ereg("^([EMAIL PROTECTED]/]+)[EMAIL PROTECTED]/](.+)$", $username, $usernamedata)) 
{
...and so on...



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
--
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

Reply via email to