FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » FUDforum 3.0+ » Matching Authors with Users During NNTP Import
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Matching Authors with Users During NNTP Import [message #166174 is a reply to message #166173] Thu, 06 October 2011 09:46 Go to previous messageGo to previous message
jm2morri is currently offline  jm2morri   
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma:
Senior Member
Or even better in my case, how would I change the code to only do the email matching when the email address doesn't contain "abc.com"? In that case, I want it to fall through and check by name, not by email. That way everyone else in the world still works fine but this one case of users acts differently.

If someone could help me with the syntax that would be great.

Right now the code is

        /* Try to identify user by email. */
        $user_id = q_singleval('SELECT id FROM '. sql_p .'users WHERE email='. _esc($from_email));


So how would I put this into an if statement that only did this if the email didn't contain "abc.com". In that case, I want it to then perform what's in the next if statement

        /* If user was not found via email, try to look the user up by login. */
        if (empty($user_id) && !empty($from_name)) {                if ($GLOBALS['FUD_OPT_2'] & 128) {
                        $user_id = q_singleval('SELECT id FROM '. sql_p .'users WHERE alias='. _esc(make_alias($from_name)));
                } else {
                        $user_id = q_singleval('SELECT id FROM '. sql_p .'users WHERE login='. _esc($from_name));
                }
        }


James.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Call to undefined function fud_use() 3.0.3RC2 (resolved)
Next Topic: 3.0.3 NNTP Import Limit
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 10 02:38:50 GMT 2024

Total time taken to generate the page: 0.04802 seconds