Public Member Functions |
| setAuthField ($value) |
| getAuthField () |
| setLoginUrl (array $value) |
| setRegistrationUrl (array $value) |
| setRecoveryUrl (array $value) |
| setReturnUrl (array $value) |
| setReturnLogoutUrl (array $value) |
| setHomePageUrl (array $value) |
| setFriendListUrl (array $value) |
| setRecoveryChangePasswordUrl (array $value) |
| setNoPermissionsUrl (array $value) |
| getRecoveryChangePasswordUrl ($locale= '') |
| getLoginUrl ($locale= '') |
| getFriendListUrl ($locale= '') |
| getRegistrationUrl ($locale= '') |
| getRecoveryUrl ($locale= '') |
| getReturnUrl ($locale= '') |
| getReturnLogoutUrl ($locale= '') |
| getNoPermissionsUrl ($locale= '') |
| getHomePageUrl ($locale= '') |
| init () |
| getBehaviorsFor ($componentName) |
| beforeControllerAction ($controller, $action) |
| getAssetsUrl () |
Static Public Member Functions |
static | t ($str= '', $params=array(), $dic= 'user') |
static | encrypting ($string="") |
static | doCaptcha ($place= '') |
static | isAdmin () |
static | user ($id=0) |
Public Attributes |
| $user_page_size = 10 |
| $fields_page_size = 10 |
| $hash = 'md5' |
| $sendActivationMail = true |
| $activationMailSubject = 'You registered from {site_name}' |
| $activationEmail |
| $loginNotActiv = false |
| $activeAfterRegister = false |
| $loginBadAttemps = 3 |
| $loginBlockTime = 300 |
| $loginAjax = false |
| $autoLogin = true |
| $fieldsMessage = '' |
| $relations = array() |
| $profileRelations = array() |
| $captcha = array('registration' => true) |
| $loggedInDuration = 0 |
| $usernameMin = 4 |
| $passwordForgottenEmail |
| $passwordMin = 4 |
| $userLoginWidgetFlashSuccess = 'UserLoginWidget-success' |
| $userLoginWidgetFlashError = 'UserLoginWidget-error' |
| $registrationNotifyAdminEmail = null |
| $registrationNotifyAdminTemplate = 'notifyAdminAboutRegister' |
| $profileEditUrl = false |
| $usernameUnique = true |
| $usernameRequired = true |
| $tableUsers = '{{users}}' |
| $tableProfiles = '{{profiles}}' |
| $tableProfileFields = '{{profiles_fields}}' |
| $tableAccounts = '{{accounts}}' |
| $componentBehaviors = array() |
Detailed Description
Member Function Documentation
static UserModule::doCaptcha |
( |
|
$place = '' | ) |
|
|
static |
- Parameters
-
- Returns
- boolean
Definition at line 434 of file UserModule.php.
Referenced by RegistrationForm\rules().
{
if (!extension_loaded('gd'))
return false;
if (in_array($place, Yii::app()->getModule('user')->captcha))
return Yii::app()->getModule('user')->captcha[$place];
return false;
}
static UserModule::encrypting |
( |
|
$string = "" | ) |
|
|
static |
UserModule::getAuthField |
( |
| ) |
|
Public getter
- Returns
- string
Definition at line 199 of file UserModule.php.
{
return $this->_authField;
}
static UserModule::isAdmin |
( |
| ) |
|
|
static |
Return admin status.
- Returns
- boolean
Definition at line 447 of file UserModule.php.
References user().
{
if (Yii::app()->
user->isGuest)
return false;
else {
return Yii::app()->user->checkAccess('Admin');
}
}
UserModule::setAuthField |
( |
|
$value | ) |
|
Public setter
- Parameters
-
- Exceptions
-
- Returns
- void
Definition at line 186 of file UserModule.php.
{
if (!in_array($value, array('username', 'email'))) {
throw new Exception('authField can have value "username" or "email"');
}
$this->_authField = $value;
}
UserModule::setFriendListUrl |
( |
array |
$value | ) |
|
- Parameters
-
Definition at line 255 of file UserModule.php.
{
$this->_friendListUrl = $value;
}
UserModule::setHomePageUrl |
( |
array |
$value | ) |
|
- Parameters
-
Definition at line 247 of file UserModule.php.
{
$this->_homePageUrl = $value;
}
UserModule::setLoginUrl |
( |
array |
$value | ) |
|
- Parameters
-
Definition at line 207 of file UserModule.php.
{
$this->_loginUrl = $value;
}
UserModule::setNoPermissionsUrl |
( |
array |
$value | ) |
|
- Parameters
-
Definition at line 268 of file UserModule.php.
{
$this->_noPermissionsUrl = $value;
}
UserModule::setRecoveryUrl |
( |
array |
$value | ) |
|
- Parameters
-
Definition at line 223 of file UserModule.php.
{
$this->_recoveryUrl = $value;
}
UserModule::setRegistrationUrl |
( |
array |
$value | ) |
|
- Parameters
-
Definition at line 215 of file UserModule.php.
{
$this->_registrationUrl = $value;
}
UserModule::setReturnLogoutUrl |
( |
array |
$value | ) |
|
- Parameters
-
Definition at line 239 of file UserModule.php.
{
$this->_returnLogoutUrl = $value;
}
UserModule::setReturnUrl |
( |
array |
$value | ) |
|
- Parameters
-
Definition at line 231 of file UserModule.php.
{
$this->_returnUrl = $value;
}
static UserModule::t |
( |
|
$str = '' , |
|
|
|
$params = array() , |
|
|
|
$dic = 'user' |
|
) |
| |
|
static |
- Parameters
-
- Returns
- string
Definition at line 411 of file UserModule.php.
Referenced by ActivationController\actionActivation(), RecoveryController\actionChange(), ProfileController\actionChangepassword(), RecoveryController\actionChangeRequest(), ProfileController\actionEdit(), RegistrationController\actionRegistration(), AdminController\actionView(), UserChangePassword\attributeLabels(), UserRecoveryForm\attributeLabels(), ProfileField\attributeLabels(), Profile\attributeLabels(), User\attributeLabels(), UWfile\editAttribute(), UWfile\init(), UWjuiAutoComplete\init(), UWrelBelongsTo\init(), UWjuidate\init(), ProfileFieldController\registerScript(), UserRecoveryForm\rules(), RegistrationForm\rules(), Profile\rules(), ProfileField\rules(), User\rules(), UserProfileEditWidget\run(), UserLoginWidget\run(), and NotContainsTagsValidator\validateAttribute().
{
return Yii::t(
"UserModule." . $dic, $str, $params);
}
static UserModule::user |
( |
|
$id = 0 | ) |
|
|
static |
Return safe user data.
- Parameters
-
- Returns
- user object or false
Definition at line 461 of file UserModule.php.
References User\model().
Referenced by isAdmin().
{
if ($id)
else {
if (Yii::app()->
user->isGuest) {
return false;
} else {
if (!self::$_user)
return self::$_user;
}
}
}
Member Data Documentation
UserModule::$loginAjax = false |
If login widget using Ajax for field validation
Definition at line 72 of file UserModule.php.
UserModule::$loginBadAttemps = 3 |
Amount of bad login attemps after which you couldnt login for $loginBlockTime
Definition at line 60 of file UserModule.php.
UserModule::$loginBlockTime = 300 |
Time in seconds for blocking ability to login after $loginBadAttemps times
string
Definition at line 67 of file UserModule.php.
The documentation for this class was generated from the following file: