Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
fkelly
Former Moderator in Good Standing



Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Thu Mar 25, 2010 1:05 pm Reply with quote

Strange situation. I had a user who couldn't login. I changed his password for him and he still couldn't login. I tried his ID on my system and couldn't login in with it either. I'd get the

_SORRYNOUSERINFO message which is defined in English as:

define('_SORRYNOUSERINFO','Sorry, no corresponding user info was found');

Traced the problem to YA/index.php where that constant can appear in a few different places depending on circumstances. Put in echoes and determined that it was finding the username in the users table okay. Kept moving the diagnostics till I got to:

Code:
 elseif ($ya_numUser == 1 AND ($setinfo['user_level'] < 1 OR $setinfo['user_active'] < 1)) {

         include_once 'header.php';
         Show_YA_menu();
         OpenTable();
         if ($setinfo['user_level'] == 0) {
            echo '<br /><center><span class="title"><strong>' . _ACCSUSPENDED . '</strong></span></center><br />';
         } elseif ($setinfo['user_level'] == -1) {
            echo '<br /><center><span class="title"><strong>' . _ACCDELETED . '</strong></span></center><br />';
         } else {
            echo '<br /><center><span class="title"><strong>' . _SORRYNOUSERINFO . '</strong></span></center><br />';
         }


Brought up phpmyadmin and determined that the user record in question had a 0 in the user_active field. Only one other record in the whole table of 1400+ records had that. Rather than hack the table through PHPmyadmin I tried suspending the user and then reinstating him. That did the trick: user_active was now set to 1.

How the user_active field got set to 0 is beyond me and it seems like potentially we have a bug because when you brought up a list of active users this user was on it even when the field was set to zero. Once the field is set back to 1 the user can login successfully.

As I say very strange. Just thought I'd post this in case anyone else runs into it.
 
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Thu Mar 25, 2010 1:13 pm Reply with quote

Thanks for the good news killing me
 
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team



Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA

PostPosted: Thu Mar 25, 2010 5:22 pm Reply with quote

did the user change their email address recently? I believe that would set a user as inactive... or at least it used to.
 
View user's profile Send private message Visit poster's website
fkelly







PostPosted: Fri Mar 26, 2010 8:14 am Reply with quote

Good suggestion spastic but it doesn't pan out. First of all, I had set RNYA configuration so that users couldn't change their own email addresses. I just changed a test user id's email administratively and looked at the user_active field before and after and it was "1" (active) both times. So I went in and changed the configuration to let them change their own email. Went back in as that user and changed the email. No effect on the active field.

Thinking overnight what we really should do (once Mantis is back up and we are past 2.40.01) is look at changing the message so that if someone tries to login who is not active they will get a message that says something like: "sorry, your account is not active, please contact the system administrator". We'd also want to look at what is causing an account to be inactive.

Also, anyone reading this and trying to deal with the problem on their site should realize that deactivating the account is NOT a solution. You can suspend a user and reinstate them and it works but deactivating essentially destroys the account information so that it cannot be reactivated or reinstated. Avoid it like the plague unless you really are taking a step towards removing (deleting) the user entirely. In fact, I never just deactivate ... I deactivate and then immediately remove the user. This is another set of behaviors we should look at post 2.40.01.
 
fkelly







PostPosted: Fri Mar 26, 2010 12:07 pm Reply with quote

For what it's worth, even if you set RNYA configuration to allow user email changes, the changes are not "taking". Nothing shows in dblog but the change just does not take effect. I don't have time to chase it down right now but when we get back to Mantis'ng, assuming we do, this needs to be logged and confirmed.
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Sat Mar 27, 2010 11:42 am Reply with quote

fkelly, why can't you add it under 2.50.00 in Mantis? I'd hate to forget about this...

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
fkelly







PostPosted: Sat Mar 27, 2010 1:49 pm Reply with quote

M. I can and will. I just haven't seen any activity in Mantis and wasn't sure we were actively keeping it up to date. Also, I keep thinking I will find a half hour to trace through this and see why and where it is happening and maybe propose a solution.

It would be helpful if someone else could confirm what I'm seeing with a 2.40 or up system. Not the active / inactive part but the part about a user's email change not "taking" even if email changes are permitted. That should be pretty easy to replicate.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©