AmyUser::load PHP Метод

load() публичный Метод

public load ( $userId )
    public function load($userId = 0)
    {
        if (!is_numeric($userId)) {
            throw new Exception("Invalid user ID specified: `{$userId}'");
        }
        if (false === ($row = Db::find_first("SELECT * FROM amy.users WHERE id={$userId} LIMIT 1"))) {
            throw new Exception("Unable to lookup user: `{$userId}'.");
        }
        $this->load_user_info($row);
        return $this;
    }