public function impersonateAdmin($username, $validate = false)
    {
        return new self($this->getConnection()->loginAs($username), $validate);
    }
public function impersonateAdmin($username, $validate = false)
    {
        return new self($this->getConnection()->loginAs($username), $validate);
    }
public function impersonateAdmin ( $ username , $ validate = false ) { return new self ( $ this -> getConnection ( ) -> loginAs ( $ username ) , $ validate ) ; }
Returns a new AdminContext acting as the specified admin.

@param string $username
@param bool $validate Whether to check the admin exists and is an admin
@return AdminContext
Returns a new AdminContext acting as the specified admin .