function get_userinfo_asobj($username) {
        $user_array = truncate_userinfo($this->get_userinfo($username));
        $user = new stdClass();
        foreach($user_array as $key=>$value) {
            $user->{$key} = $value;
        }
        return $user;
    }
function get_userinfo_asobj($username) {
        $user_array = truncate_userinfo($this->get_userinfo($username));
        $user = new stdClass();
        foreach($user_array as $key=>$value) {
            $user->{$key} = $value;
        }
        return $user;
    }
function get_userinfo_asobj ( $ username ) { $ user_array = truncate_userinfo ( $ this -> get_userinfo ( $ username ) ) ; $ user = new stdClass ( ) ; foreach ( $ user_array as $ key => $ value ) { $ user -> { $ key } = $ value ; } return $ user ; }
Reads user information from DB and return it in an object.

@param string $username username
@return array
Reads user information from DB and return it in an object .