-

Get the username and not the ID [ANTISPAM ACP]

Support for phpBB3, phpBB3 Modifications, and phpBB3 styles
Forum rules
Bugs go in the Bug Tracker

Get the username and not the ID [ANTISPAM ACP]

Postby geolim4 » Sun May 22, 2011 8:13 pm

Hello all, i want know how to get the Username and not the user_id when a spammer is registering:
In the log you can see:
Code: Select all
555 registered and was flagged as a possible spam account by Stop Forum Spam.

But %s match with the following code added:
Code: Select all
                // START Anti-Spam ACP
                antispam::ucp_postregister($user_id, $user_row);
                // END Anti-Spam ACP   


I have try:

Code: Select all
                // START Anti-Spam ACP
                antispam::ucp_postregister($user_id, $user_row, username);
                // END Anti-Spam ACP   


And replace:
Code: Select all
        {
            
self::add_log('LOG_USER_SFS_ACTIVATION', array($user_id));
        } 

By
Code: Select all
        {
            
self::add_log('LOG_USER_SFS_ACTIVATION', array($username));
        } 

But not work.....
Can you help me to fix make that?
Cheers ;)
geolim4
Donor
Donor
 
Posts: 19
Joined: Sun Apr 24, 2011 5:37 pm
Blog: View Blog (0)

Re: Get the username and not the ID [ANTISPAM ACP]

Postby EXreaction » Sun May 22, 2011 9:22 pm

Don't need to do the first change. Instead of $username try using $user_row['username'] in the log line
Grateful for the mods I've built? Then donate!
User avatar
EXreaction
Site Owner
Site Owner
 
Posts: 4996
Joined: Wed Jun 28, 2006 5:08 pm
Blog: View Blog (53)

Re: Get the username and not the ID [ANTISPAM ACP]

Postby geolim4 » Tue May 24, 2011 7:53 am

Thanks for reply, what file you mean?
/Root/includes/acp/acp_asacp.php?

Ligne: 193

Code: Select all
                        $db->sql_query('UPDATE ' USERS_TABLE ' SET user_flag_new = 0 WHERE user_id = ' $user->data['user_id']); 


Cheers,
geolim4
Donor
Donor
 
Posts: 19
Joined: Sun Apr 24, 2011 5:37 pm
Blog: View Blog (0)

Re: Get the username and not the ID [ANTISPAM ACP]

Postby EXreaction » Tue May 24, 2011 1:37 pm

Undo that other stuff you did and try just changing the following:
Code: Select all
        {
            self::add_log('LOG_USER_SFS_ACTIVATION', array($user_id));
        }


Code: Select all
        {
            self::add_log('LOG_USER_SFS_ACTIVATION', array($user_row['username']));
        }
Grateful for the mods I've built? Then donate!
User avatar
EXreaction
Site Owner
Site Owner
 
Posts: 4996
Joined: Wed Jun 28, 2006 5:08 pm
Blog: View Blog (53)

Re: Get the username and not the ID [ANTISPAM ACP]

Postby geolim4 » Tue May 24, 2011 2:03 pm

Work perfect, thanks !!!
Solved !!!
geolim4
Donor
Donor
 
Posts: 19
Joined: Sun Apr 24, 2011 5:37 pm
Blog: View Blog (0)


Return to phpBB3 Support



Who is online

Users browsing this forum: MOB and 6 guests

cron