Returns whether a user is currently locked.
public isLocked ( string $userId, boolean $show_details = false ) : boolean | array | ||
$userId | string | The user to check. |
$show_details | boolean | Return timeout too? |
Результат | boolean | array | If $show_details is a true, an array with 'locked' and 'lock_timeout' values. Whether the user is locked, otherwise. |
/** * Checks if $userId is currently locked. * * @param string $userId The userId to check. * @param boolean $show_details Toggle array format with timeout. * * @throws Horde_Auth_Exception */ public function isLocked($userId, $show_details = false) { if ($this->_base) { return $this->_base->isLocked($userId, $show_details); } if ($this->hasCapability('lock')) { return parent::isLocked($userId, $show_details); } }
/** * Checks if $userId is currently locked. * * @param string $userId The userId to check. * @param boolean $show_details Toggle array format with timeout. * * @throws Horde_Auth_Exception */ public function isLocked($userId, $show_details = false) { if ($this->_base) { return $this->_base->isLocked($userId, $show_details); } if ($this->hasCapability('lock')) { return $GLOBALS['registry']->callAppMethod($this->_app, 'authIsLocked', array('args' => array($userId, $show_details))); } else { return parent::isLocked($userId, $show_details); } }
/** */ public function isLocked($userId, $show_details = false) { return $this->_base->isLocked($GLOBALS['registry']->convertUsername($userId, true), $show_details); }