ElggUser::removeAdmin PHP 메소드

removeAdmin() 공개 메소드

Remove the admin flag for user
public removeAdmin ( ) : boolean
리턴 boolean
    public function removeAdmin()
    {
        if (!$this->isAdmin()) {
            return true;
        }
        // If already saved, use the standard function.
        if ($this->guid && !remove_user_admin($this->guid)) {
            return false;
        }
        // need to manually set attributes since they've already been loaded.
        $this->attributes['admin'] = 'no';
        return true;
    }