Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Registered users aren't members? (http://www.mysidiaadoptables.com/forum/showthread.php?t=5262)

Dinocanid 11-06-2016 04:13 PM

Registered users aren't members?
 
Yet another problem related to logging in/out/registering. I just had a new member sign up, but they don't have proper access to the site as a member does. Here's what they said:
Quote:

Hello and this sounds very interesting. I just registered, so it told me, and it said go to manage account or adopt a pet so tried the adopt, but it says that only members can access this are. I logged in and it said successful so tried manage account and again got the only members can access this area thing. My user name/nickname is kithri, the same as here, so if you could please check this as maybe I'm doing something wrong...or it might be bug, thanks.
I checked phpMyAdmin and everything looks fine from there, so I just can't see what's wrong.

Hwona 11-06-2016 05:44 PM

Re
 
Is this a problem for all users? If so, could you past your account.php page? Also, there's a possibility that the user may have been autobanned for some reason?

Dinocanid 11-06-2016 05:52 PM

As far as I know, it's only happening to newly registered users. I checked the account and it seems to have all the permissions of a normal member. (same usergroup, same status). This is my account.php:
PHP Code:

<?php

use Resource\Native\String;
use 
Resource\Collection\ArrayList;

class 
AccountController extends AppController{

    public function 
__construct(){
        
parent::__construct("member");    
    }
    
    public function 
password(){
        
$mysidia Registry::get("mysidia");        
        if(
$mysidia->input->post("submit")){
            
$newsalt codegen(15,0);
            
$newpass1 passencr($mysidia->user->username$mysidia->input->post("np1"), $newsalt);
            
$newpass2 passencr($mysidia->user->username$mysidia->input->post("np2"), $newsalt);
            
$userdata $mysidia->db->select("users", array("uid""username""password""salt""session"), "username='{$mysidia->user->username}'")->fetchObject();    
            
$currentpass passencr($userdata->username$mysidia->input->post("cpass"), $userdata->salt);
  
            if(
$currentpass != $userdata->password) throw new PasswordException("password_current");
            elseif(
$newpass1 != $newpass2) throw new PasswordException("password_new");
            elseif(!
$mysidia->input->post("np1") or !$mysidia->input->post("np2")) throw new PasswordException("password_blank");
            else{
                
$mysidia->db->update("users", array("password" => $newpass1"salt" => $newsalt), "username='{$mysidia->user->username}' AND password='{$currentpass}'");     
                
$mysidia->cookies->deletecookies();
            }
        }
    }
    
    public function 
email(){
        
$mysidia Registry::get("mysidia");        
        if(
$mysidia->input->post("submit")){
            
$validator = new UserValidator($mysidia->user, array("email" => $mysidia->input->post("email")));
            
$validator->validate("email");
            
            if(!
$validator->triggererror()) $mysidia->db->update("users", array("email" => $mysidia->input->post("email")), "username = '{$mysidia->user->username}'");
            else throw new 
EmailException("email_invalid");
        }
    }
    
    public function 
friends(){
        
$mysidia Registry::get("mysidia");
        
$this->setField("friendlist", new FriendList($mysidia->user));
    }
    
    public function 
profile(){
        
$mysidia Registry::get("mysidia");
        
$profile $mysidia->user->getprofile();
        
        if(
$mysidia->input->post("submit")){
            
$mysidia->db->update("users_profile", array("avatar" => $mysidia->input->post("avatar"), "nickname" => $mysidia->input->post("nickname"), "gender" => $mysidia->input->post("gender"), "color" => $mysidia->input->post("color"), "bio" => $mysidia->input->post("bio"), "favpet" => $mysidia->input->post("favpet"), "about" => $mysidia->input->post("about")), "username = '{$mysidia->user->username}'");
            return;
        }
        
        if(!(
$profile instanceof UserProfile)) throw new ProfileException("profile_nonexist");
        elseif(
$mysidia->user->uid != $profile->uid) throw new ProfileException("profile_edit");
        else{   
            
$stmt $mysidia->db->select("owned_adoptables", array("name""aid"), "owner = '{$mysidia->user->username}'");
            
$map $mysidia->db->fetchMap($stmt);
            
$this->setField("profile"$profile);
            
$this->setField("petMap"$map);
        }
    }
    
    public function 
contacts(){
        
$mysidia Registry::get("mysidia");        
        if(
$mysidia->input->post("submit")){
            
$newmsgnotify = ($mysidia->input->post("newmsgnotify") == 1)?1:0;
            
$mysidia->db->update("users_options", array("newmessagenotify" => $newmsgnotify), "username='{$mysidia->user->username}'");
            
$mysidia->db->update("users_contacts", array("website" => $mysidia->input->post("website"), "facebook" => $mysidia->input->post("facebook"), "twitter" => $mysidia->input->post("twitter"), "aim" => $mysidia->input->post("aim"), "yahoo" => $mysidia->input->post("yim"), "msn" => $mysidia->input->post("msn"), "skype" => $mysidia->input->post("skype")), "username = '{$mysidia->user->username}'");
            return;
        }
        
        
$contactList = new ArrayList;    
        
$contactList->add(new String("website"));
        
$contactList->add(new String("facebook"));
        
$contactList->add(new String("twitter"));    
        
$contactList->add(new String("msn"));
        
$contactList->add(new String("aim"));
        
$contactList->add(new String("yim"));
        
$contactList->add(new String("skype"));    
        
$this->setField("contactList"$contactList);
    }
}
?>

I don't think I've touched any of the code related to registering or accounts though.

Hwona 11-07-2016 06:05 AM

Yikes, I have no idea. Have you checked capitalization? Maybe 'Member' was put into the database instead of 'member' or 'registered'?

Hall of Famer 11-07-2016 10:08 AM

Did you change the usergroup name or settings in admincp? Its recommended that you do not touch the existing usergroups unless you know what you are doing, it can lead to strange errors.

Dinocanid 11-07-2016 11:05 AM

I added a usergroup (which nobody is currently in), but I haven't changed anything. I checked the usergroups and all of the members are registered. They're represented by numbers, so there aren't any capitalization errors.

I think I fixed the problem. It turned out to be related to my other thread about not being able to log out. They were getting the same error as me.


All times are GMT -5. The time now is 01:21 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.