Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 11-06-2016, 04:13 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 63,652
Dinocanid is on a distinguished road
Default 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.
__________________
Reply With Quote
  #2  
Old 11-06-2016, 05:44 PM
Hwona's Avatar
Hwona Hwona is offline
Member
 
Join Date: Mar 2013
Posts: 620
Gender: Female
Credits: 48,164
Hwona is on a distinguished road
Default 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?
__________________
Reply With Quote
  #3  
Old 11-06-2016, 05:52 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 63,652
Dinocanid is on a distinguished road
Default

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.
__________________
Reply With Quote
  #4  
Old 11-07-2016, 06:05 AM
Hwona's Avatar
Hwona Hwona is offline
Member
 
Join Date: Mar 2013
Posts: 620
Gender: Female
Credits: 48,164
Hwona is on a distinguished road
Default

Yikes, I have no idea. Have you checked capitalization? Maybe 'Member' was put into the database instead of 'member' or 'registered'?
__________________
Reply With Quote
  #5  
Old 11-07-2016, 10:08 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 327,503
Hall of Famer is on a distinguished road
Default

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.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #6  
Old 11-07-2016, 11:05 AM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 63,652
Dinocanid is on a distinguished road
Default

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.
__________________
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 02:28 PM.

Currently Active Users: 461 (0 members and 461 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636