PHP 클래스 Scalr_Account_User

또한 보기: Scalr\Model\Entity\Account\User
사용 중단: This class has been deprecated since version 5.4.0. Please use new Scalr\Model\Entity\Account\User entity.
상속: extends Scalr_Model
파일 보기 프로젝트 열기: scalr/scalr 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$accountId
$comments
$dtCreated
$dtLastLogin
$email
$fullname
$loginattempts
$status
$type

보호된 프로퍼티들

프로퍼티 타입 설명
$account
$dbMessageKeyNotFound
$dbPrimaryKey
$dbPropertyMap
$dbTableName
$password
$permissions
$settingsCache
$varCache

공개 메소드들

메소드 설명
addDashboardWidget ( integer $envId, array $widgetConfig, integer $columnNumber, integer $position ) Adds widget to dashboard
applyLdapGroups ( $groups ) Special method for LDAP auth sync LDAP groups to Scalr groups
canEditUser ( Scalr_Account_User $user ) : boolean Checks whether the user is allowed to edit specified user
canManageAcl ( ) : boolean Checks whether the user is allowed to manage ACL
canRemoveUser ( Scalr_Account_User $user ) : boolean Checks whether the user is allowed to remove specified user
checkPassword ( string $pwd, boolean $updateLoginAttempt = true ) : boolean Checks password
create ( $email, $accountId )
delete ( $id = null )
getAccount ( ) : Scalr_Account
getAccountId ( )
getAclRoles ( boolean $ignoreCache = false ) : Scalr\Acl\Role\AccountRoleSuperposition Gets account level roles for the user
getAclRolesByEnvironment ( integer $envId, boolean $ignoreCache = false ) : Scalr\Acl\Role\AccountRoleSuperposition Gets roles by specified ID of environment
getAclRolesByTeam ( integer $teamId ) : Scalr\Acl\Role\AccountRoleSuperposition Gets roles by specified ID of team
getDashboard ( integer $envId ) : array Get user dashboard
getDefaultEnvironment ( integer $envId ) : Scalr_Environment Gets environment object for the specified identifier.
getEmail ( ) : string Gets email address of the User
getEnvironments ( string $filter = null, boolean $orderByPriority = false ) : array Gets environments of the current user filtered by name
getGravatarHash ( )
getId ( ) : integer Gets effective user identifier
getLdapUsername ( ) : string Gets LDAP username of the User
getList ( $accountId )
getPermissions ( ) : Scalr_Permissions Gets scalr permission object
getSetting ( string $name, boolean $ignoreCache = false ) : mixed Returns user setting value by name
getSshConsoleSettings ( $ignoreCache = false, $gvi = false, $serverId = null )
getTeams ( ) : array
getType ( )
getUserInfo ( )
getVar ( string $name, boolean $ignoreCache = false ) : mixed Returns user var value by name
init ( $className = null ) : Scalr_Account_User
isAccountAdmin ( ) : boolean Checks if the user is account admin
isAccountOwner ( ) : boolean Checks if the user is account owher
isAccountSuperAdmin ( ) : boolean Checks if the user is account admin
isAdmin ( ) : boolean Checks if the user is admin user (scalr, financial). It means user doesn't have current environment
isEmailExists ( $email )
isFinAdmin ( ) : boolean Checks if the user is Financial admin
isInTeam ( integer $teamId ) : boolean Check if user is included in team
isLeadVerified ( ) : boolean
isScalrAdmin ( ) : boolean Checks if the user is Scalr admin
isSubjectLead ( string $projectId = null, string $ccId = null ) : boolean Checks if user has access to project or cost center
isTeamOwner ( integer $teamId = null ) : boolean Checks wheter this user is considered to be the team owner for the specified team.
isTeamOwnerInEnvironment ( integer $envId ) : boolean Checks if the user is both AccountAdmin and member of the specified environment
isTeamUser ( ) : boolean Checks if the user is team user
isUser ( ) : boolean Checks if the user is account user (owner, admin, team user)
loadByApiAccessKey ( string $accessKey ) : Scalr_Account_User Loads user by the specified access key
loadByEmail ( string $email, $accountId = null ) : Scalr_Account_User Loads user by an email
loadBySetting ( string $name, string $value ) : Scalr_Account_User Loads user by the specified unique setting
save ( $forceInsert = false )
setAclRoles ( array $data = [] ) Sets ACL roles to this user
setDashboard ( integer $envId, array $value ) Set user dashboard
setSetting ( string $name, mixed $value ) : void Set user setting
setSshConsoleSettings ( $settings )
setVar ( string $name, mixed $value ) : void Set user var
updateEmail ( $email )
updateLastLogin ( )
updateLoginAttempt ( integer | null $loginattempt = null ) Increases or resets the number of attempts to sign in
updatePassword ( $pwd )

메소드 상세

addDashboardWidget() 공개 메소드

Adds widget to dashboard
public addDashboardWidget ( integer $envId, array $widgetConfig, integer $columnNumber, integer $position )
$envId integer The identifier of the environment
$widgetConfig array Widget config
$columnNumber integer optional the number of the column
$position integer optional the position

applyLdapGroups() 공개 메소드

Special method for LDAP auth sync LDAP groups to Scalr groups
public applyLdapGroups ( $groups )
$groups

canEditUser() 공개 메소드

Checks whether the user is allowed to edit specified user
public canEditUser ( Scalr_Account_User $user ) : boolean
$user Scalr_Account_User The user to edit
리턴 boolean Returns true if the user is allowed to edit specified user

canManageAcl() 공개 메소드

Checks whether the user is allowed to manage ACL
public canManageAcl ( ) : boolean
리턴 boolean Returns true if user is allowed to manage ACL

canRemoveUser() 공개 메소드

Checks whether the user is allowed to remove specified user
public canRemoveUser ( Scalr_Account_User $user ) : boolean
$user Scalr_Account_User The user to remove
리턴 boolean Returns true if the user is allowed to remove specified user

checkPassword() 공개 메소드

Checks password
public checkPassword ( string $pwd, boolean $updateLoginAttempt = true ) : boolean
$pwd string A password
$updateLoginAttempt boolean optional Whether it should update the number of attempts
리턴 boolean Returns true if password is valid

create() 공개 메소드

public create ( $email, $accountId )

delete() 공개 메소드

또한 보기: Scalr_Model::delete()
public delete ( $id = null )

getAccount() 공개 메소드

public getAccount ( ) : Scalr_Account
리턴 Scalr_Account

getAccountId() 공개 메소드

public getAccountId ( )

getAclRoles() 공개 메소드

Gets account level roles for the user
public getAclRoles ( boolean $ignoreCache = false ) : Scalr\Acl\Role\AccountRoleSuperposition
$ignoreCache boolean
리턴 Scalr\Acl\Role\AccountRoleSuperposition Returns the list of the roles of account level

getAclRolesByEnvironment() 공개 메소드

Gets roles by specified ID of environment
public getAclRolesByEnvironment ( integer $envId, boolean $ignoreCache = false ) : Scalr\Acl\Role\AccountRoleSuperposition
$envId integer The ID of the client's environment
$ignoreCache boolean optional Ignore cache.
리턴 Scalr\Acl\Role\AccountRoleSuperposition Returns the list of the roles of account level by specified environment

getAclRolesByTeam() 공개 메소드

Gets roles by specified ID of team
public getAclRolesByTeam ( integer $teamId ) : Scalr\Acl\Role\AccountRoleSuperposition
$teamId integer The ID of the team
리턴 Scalr\Acl\Role\AccountRoleSuperposition Returns the list of the roles of account level by specified team

getDashboard() 공개 메소드

Get user dashboard
public getDashboard ( integer $envId ) : array
$envId integer
리턴 array

getDefaultEnvironment() 공개 메소드

In case the identifier is not specified it takes default Environment from the list of the available for current User.
public getDefaultEnvironment ( integer $envId ) : Scalr_Environment
$envId integer optional The identifier of the Environment
리턴 Scalr_Environment Returns Environment object

getEmail() 공개 메소드

Gets email address of the User
public getEmail ( ) : string
리턴 string Returns user email address

getEnvironments() 공개 메소드

Gets environments of the current user filtered by name
public getEnvironments ( string $filter = null, boolean $orderByPriority = false ) : array
$filter string optional Filter string
$orderByPriority boolean optional Order by default_priority
리턴 array

getGravatarHash() 공개 메소드

public getGravatarHash ( )

getId() 공개 메소드

Gets effective user identifier
public getId ( ) : integer
리턴 integer Returns identifier of the user

getLdapUsername() 공개 메소드

Gets LDAP username of the User
public getLdapUsername ( ) : string
리턴 string Returns user LDAP username

getList() 공개 정적인 메소드

public static getList ( $accountId )

getPermissions() 공개 메소드

Gets scalr permission object
public getPermissions ( ) : Scalr_Permissions
리턴 Scalr_Permissions

getSetting() 공개 메소드

Returns user setting value by name
public getSetting ( string $name, boolean $ignoreCache = false ) : mixed
$name string
$ignoreCache boolean
리턴 mixed $value

getSshConsoleSettings() 공개 메소드

public getSshConsoleSettings ( $ignoreCache = false, $gvi = false, $serverId = null )

getTeams() 공개 메소드

public getTeams ( ) : array
리턴 array

getType() 공개 메소드

public getType ( )

getUserInfo() 공개 메소드

public getUserInfo ( )

getVar() 공개 메소드

Returns user var value by name
public getVar ( string $name, boolean $ignoreCache = false ) : mixed
$name string
$ignoreCache boolean
리턴 mixed $value

init() 공개 정적인 메소드

public static init ( $className = null ) : Scalr_Account_User
리턴 Scalr_Account_User

isAccountAdmin() 공개 메소드

Checks if the user is account admin
public isAccountAdmin ( ) : boolean
리턴 boolean Returns true if user is account admin

isAccountOwner() 공개 메소드

Checks if the user is account owher
public isAccountOwner ( ) : boolean
리턴 boolean Returns true if user is account owner.

isAccountSuperAdmin() 공개 메소드

Checks if the user is account admin
public isAccountSuperAdmin ( ) : boolean
리턴 boolean Returns true if user is account super admin

isAdmin() 공개 메소드

Checks if the user is admin user (scalr, financial). It means user doesn't have current environment
public isAdmin ( ) : boolean
리턴 boolean

isEmailExists() 공개 메소드

public isEmailExists ( $email )

isFinAdmin() 공개 메소드

Checks if the user is Financial admin
public isFinAdmin ( ) : boolean
리턴 boolean Returns true if user is Financial Admin

isInTeam() 공개 메소드

Check if user is included in team
public isInTeam ( integer $teamId ) : boolean
$teamId integer
리턴 boolean

isLeadVerified() 공개 메소드

public isLeadVerified ( ) : boolean
리턴 boolean Returns true if lead is verified

isScalrAdmin() 공개 메소드

Checks if the user is Scalr admin
public isScalrAdmin ( ) : boolean
리턴 boolean Returns true if user is Scalr Admin

isSubjectLead() 공개 메소드

Checks if user has access to project or cost center
public isSubjectLead ( string $projectId = null, string $ccId = null ) : boolean
$projectId string optional Id of the project
$ccId string optional Id of the cost center
리턴 boolean Returns false if user is not lead of the subject

isTeamOwner() 공개 메소드

Checks wheter this user is considered to be the team owner for the specified team.
사용 중단: This function has been deprecated since new ACL
public isTeamOwner ( integer $teamId = null ) : boolean
$teamId integer The identifier of the team.
리턴 boolean Returns true if the user is considered to be the team owner for the specified team.

isTeamOwnerInEnvironment() 공개 메소드

Checks if the user is both AccountAdmin and member of the specified environment
사용 중단: This function has been deprecated since new ACL
public isTeamOwnerInEnvironment ( integer $envId ) : boolean
$envId integer The identifier of the environment
리턴 boolean

isTeamUser() 공개 메소드

Checks if the user is team user
public isTeamUser ( ) : boolean
리턴 boolean Returns true if user is team user

isUser() 공개 메소드

Checks if the user is account user (owner, admin, team user)
public isUser ( ) : boolean
리턴 boolean

loadByApiAccessKey() 공개 메소드

Loads user by the specified access key
public loadByApiAccessKey ( string $accessKey ) : Scalr_Account_User
$accessKey string An access key
리턴 Scalr_Account_User

loadByEmail() 공개 메소드

Loads user by an email
public loadByEmail ( string $email, $accountId = null ) : Scalr_Account_User
$email string The email of the user
리턴 Scalr_Account_User

loadBySetting() 공개 메소드

Loads user by the specified unique setting
public loadBySetting ( string $name, string $value ) : Scalr_Account_User
$name string The setting name
$value string The value
리턴 Scalr_Account_User

save() 공개 메소드

또한 보기: Scalr_Model::save()
public save ( $forceInsert = false )

setAclRoles() 공개 메소드

This method modifies resords of two tables account_team_users and account_team_user_acls. Attention! It expects full list of the ACL roles relations for user. All missing relations will be removed.
public setAclRoles ( array $data = [] )
$data array ACL roles array which looks like array(teamId => array(accountRoleId1, accountRoleId2, ...))

setDashboard() 공개 메소드

Set user dashboard
public setDashboard ( integer $envId, array $value )
$envId integer
$value array

setSetting() 공개 메소드

Set user setting
public setSetting ( string $name, mixed $value ) : void
$name string
$value mixed
리턴 void

setSshConsoleSettings() 공개 메소드

public setSshConsoleSettings ( $settings )

setVar() 공개 메소드

Set user var
public setVar ( string $name, mixed $value ) : void
$name string
$value mixed
리턴 void

updateEmail() 공개 메소드

public updateEmail ( $email )

updateLastLogin() 공개 메소드

public updateLastLogin ( )

updateLoginAttempt() 공개 메소드

Increases or resets the number of attempts to sign in
public updateLoginAttempt ( integer | null $loginattempt = null )
$loginattempt integer | null optional The number to increase

updatePassword() 공개 메소드

public updatePassword ( $pwd )

프로퍼티 상세

$account 보호되어 있는 프로퍼티

protected $account

$accountId 공개적으로 프로퍼티

public $accountId

$comments 공개적으로 프로퍼티

public $comments

$dbMessageKeyNotFound 보호되어 있는 프로퍼티

protected $dbMessageKeyNotFound

$dbPrimaryKey 보호되어 있는 프로퍼티

protected $dbPrimaryKey

$dbPropertyMap 보호되어 있는 프로퍼티

protected $dbPropertyMap

$dbTableName 보호되어 있는 프로퍼티

protected $dbTableName

$dtCreated 공개적으로 프로퍼티

public $dtCreated

$dtLastLogin 공개적으로 프로퍼티

public $dtLastLogin

$email 공개적으로 프로퍼티

public $email

$fullname 공개적으로 프로퍼티

public $fullname

$loginattempts 공개적으로 프로퍼티

public $loginattempts

$password 보호되어 있는 프로퍼티

protected $password

$permissions 보호되어 있는 프로퍼티

protected $permissions

$settingsCache 보호되어 있는 프로퍼티

protected $settingsCache

$status 공개적으로 프로퍼티

public $status

$type 공개적으로 프로퍼티

public $type

$varCache 보호되어 있는 프로퍼티

protected $varCache