PHP Class Adldap\Models\User

Inheritance: extends Entry, use trait Adldap\Models\Traits\HasDescriptionTrait, use trait Adldap\Models\Traits\HasMemberOfTrait, use trait Adldap\Models\Traits\HasLastLogonAndLogOffTrait
Show file Open project: adldap2/adldap2 Class Usage Examples

Public Methods

Method Description
addProxyAddress ( string $address ) : User Add's a single proxy address to the user.
changePassword ( string $oldPassword, string $newPassword, boolean $replaceNotRemove = false ) : boolean Change the password of the current user. This must be performed over SSL.
expirationDate ( ) : DateTim\DateTime | null Return the expiration date of the user account.
getAccountExpiry ( ) : string Returns the users account expiry date.
getAuthIdentifier ( ) : mixed Get the unique identifier for the user.
getAuthIdentifierName ( ) : string Get the name of the unique identifier for the user.
getAuthPassword ( ) : string Get the password for the user.
getBadPasswordCount ( ) : string Returns the users bad password count.
getBadPasswordTime ( ) : string Returns the users bad password time.
getCompany ( ) : string Returns the users company.
getCountry ( ) : string Returns the users country.
getDepartment ( ) : string Returns the users department.
getDepartmentNumber ( ) : string Returns the department number.
getDisplayName ( ) : string Returns the users display name.
getEmail ( ) : string Returns the users primary email address.
getEmails ( ) : array Returns the users email addresses.
getEmployeeId ( ) : string Return the employee ID.
getEmployeeNumber ( ) : string Returns the employee number.
getFirstName ( ) : mixed Returns the users first name.
getHomeMdb ( ) : string Returns the users mailbox store DN.
getInfo ( ) : mixed Returns the users info.
getInitials ( ) : mixed Returns the users initials.
getJpegPhoto ( ) : mixed Returns the users jpeg photo.
getJpegPhotoEncoded ( ) : null | string Returns the users jpeg photo.
getLastName ( ) : mixed Returns the users last name.
getLegacyExchangeDn ( ) : string Returns the users legacy exchange distinguished name.
getLocale ( ) : string Returns the users locale.
getLockoutTime ( ) : string Returns the users lockout time.
getMailNickname ( ) : string Returns the users mail nickname.
getManager ( ) : string Returns the distinguished name of the user who is the user's manager.
getOtherMailbox ( ) : array Returns the users other mailbox attribute.
getPasswordLastSet ( ) : string Returns the time when the users password was set last.
getPasswordLastSetDate ( ) : string | null Returns the formatted timestamp of the password last set date.
getPasswordLastSetTimestamp ( ) : float | null Returns the password last set unix timestamp.
getPersonalTitle ( ) : User Return the personal title.
getPhysicalDeliveryOfficeName ( ) : string Returns the users physical delivery office name.
getPostalCode ( ) : string Returns the users postal code.
getPrimaryGroup ( ) : Model | boolean Retrieves the primary group of the current user.
getProfilePath ( ) : string Returns the users profile file path.
getProxyAddresses ( ) : array Returns the users proxy addresses.
getRememberToken ( ) : string Get the token value for the "remember me" session.
getRememberTokenName ( ) : string Get the column name for the "remember me" token.
getRoomNumber ( ) : string Returns the room number.
getScriptPath ( ) : string Returns the users script path if the user has one.
getShowInAddressBook ( ) : array Returns an array of address book DNs that the user is listed to be shown in.
getStreetAddress ( ) : User Returns the users street address.
getTelephoneNumber ( ) : string Returns the users telephone number.
getThumbnail ( ) : mixed Returns the users thumbnail photo.
getThumbnailEncoded ( ) : null | string Returns the users thumbnail photo base 64 encoded.
getTitle ( ) : string Returns the users title.
getUserAccountControl ( ) : string Returns the users user account control integer.
getUserPrincipalName ( ) : string Returns the users principal name.
isActive ( ) : boolean Return true / false if AD User is active (enabled & not expired).
isDisabled ( ) : boolean Returns if the user is disabled.
isEnabled ( ) : boolean Returns if the user is enabled.
isExpired ( DateTim\DateTime $date = null ) : boolean Return true / false if the AD User is expired.
passwordExpired ( ) : boolean Returns true / false if the users password is expired.
setAccountExpiry ( float $expiryTime ) : User Sets the users account expiry date.
setCompany ( string $company ) : User Sets the users company.
setCountry ( string $country ) : User Sets the users country.
setDepartment ( string $department ) : User Sets the users department.
setDepartmentNumber ( string $number ) : User Sets the department number.
setDisplayName ( string $displayName ) : User Sets the users display name.
setEmail ( string $email ) : User Sets the users email.
setEmails ( array $emails = [] ) : User Sets the users email addresses.
setEmployeeId ( string $employeeId ) : User Sets the employee ID.
setEmployeeNumber ( string $number ) : User Sets the employee number.
setFirstName ( string $firstName ) : User Sets the users first name.
setInfo ( string $info ) : User Sets the users info.
setInitials ( string $initials ) : User Sets the users initials.
setLastName ( string $lastName ) : User Sets the users last name.
setLocale ( string $locale ) : User Sets the users locale.
setManager ( string $managerDn ) : User Sets the distinguished name of the user who is the user's manager.
setOtherMailbox ( array $otherMailbox = [] ) : User Sets the users other mailboxes.
setPassword ( string $password ) Sets the password on the current user.
setPersonalTitle ( string $personalTitle ) : User Sets the personal title.
setPhysicalDeliveryOfficeName ( string $deliveryOffice ) : User Sets the users physical delivery office name.
setPostalCode ( string $postalCode ) : User Sets the users postal code.
setProfilePath ( string $path ) : User Sets the users profile path.
setProxyAddresses ( array $addresses = [] ) : User Sets the users proxy addresses.
setRememberToken ( string $value ) : void Set the token value for the "remember me" session.
setRoomNumber ( string $number ) : User Sets the room number.
setScriptPath ( string $path ) : User Sets the users script path.
setStreetAddress ( string $address ) : User Sets the users street address.
setTelephoneNumber ( string $number ) : User Sets the users telephone number.
setTitle ( string $title ) : User Sets the users title.
setUserAccountControl ( integer | string | AccountControl $accountControl ) : User Sets the users account control property.
setUserPrincipalName ( string $userPrincipalName ) : User Sets the users user principal name.

Method Details

addProxyAddress() public method

Add's a single proxy address to the user.
public addProxyAddress ( string $address ) : User
$address string
return User

changePassword() public method

Change the password of the current user. This must be performed over SSL.
public changePassword ( string $oldPassword, string $newPassword, boolean $replaceNotRemove = false ) : boolean
$oldPassword string The new password
$newPassword string The old password
$replaceNotRemove boolean Alternative password change method. Set to true if you're receiving 'CONSTRAINT' errors.
return boolean

expirationDate() public method

Return the expiration date of the user account.
public expirationDate ( ) : DateTim\DateTime | null
return DateTim\DateTime | null

getAccountExpiry() public method

Returns the users account expiry date.
public getAccountExpiry ( ) : string
return string

getAuthIdentifier() public method

Get the unique identifier for the user.
public getAuthIdentifier ( ) : mixed
return mixed

getAuthIdentifierName() public method

Get the name of the unique identifier for the user.
public getAuthIdentifierName ( ) : string
return string

getAuthPassword() public method

Get the password for the user.
public getAuthPassword ( ) : string
return string

getBadPasswordCount() public method

Returns the users bad password count.
public getBadPasswordCount ( ) : string
return string

getBadPasswordTime() public method

Returns the users bad password time.
public getBadPasswordTime ( ) : string
return string

getCompany() public method

https://msdn.microsoft.com/en-us/library/ms675457(v=vs.85).aspx
public getCompany ( ) : string
return string

getCountry() public method

Returns the users country.
public getCountry ( ) : string
return string

getDepartment() public method

https://msdn.microsoft.com/en-us/library/ms675490(v=vs.85).aspx
public getDepartment ( ) : string
return string

getDepartmentNumber() public method

Returns the department number.
public getDepartmentNumber ( ) : string
return string

getDisplayName() public method

Returns the users display name.
public getDisplayName ( ) : string
return string

getEmail() public method

https://msdn.microsoft.com/en-us/library/ms676855(v=vs.85).aspx
public getEmail ( ) : string
return string

getEmails() public method

https://msdn.microsoft.com/en-us/library/ms676855(v=vs.85).aspx
public getEmails ( ) : array
return array

getEmployeeId() public method

Return the employee ID.
public getEmployeeId ( ) : string
return string

getEmployeeNumber() public method

Returns the employee number.
public getEmployeeNumber ( ) : string
return string

getFirstName() public method

https://msdn.microsoft.com/en-us/library/ms675719(v=vs.85).aspx
public getFirstName ( ) : mixed
return mixed

getHomeMdb() public method

https://msdn.microsoft.com/en-us/library/aa487565(v=exchg.65).aspx
public getHomeMdb ( ) : string
return string

getInfo() public method

Returns the users info.
public getInfo ( ) : mixed
return mixed

getInitials() public method

Returns the users initials.
public getInitials ( ) : mixed
return mixed

getJpegPhoto() public method

Returns the users jpeg photo.
public getJpegPhoto ( ) : mixed
return mixed

getJpegPhotoEncoded() public method

Returns the users jpeg photo.
public getJpegPhotoEncoded ( ) : null | string
return null | string

getLastName() public method

https://msdn.microsoft.com/en-us/library/ms679872(v=vs.85).aspx
public getLastName ( ) : mixed
return mixed

getLegacyExchangeDn() public method

Returns the users legacy exchange distinguished name.
public getLegacyExchangeDn ( ) : string
return string

getLocale() public method

Returns the users locale.
public getLocale ( ) : string
return string

getLockoutTime() public method

Returns the users lockout time.
public getLockoutTime ( ) : string
return string

getMailNickname() public method

Returns the users mail nickname.
public getMailNickname ( ) : string
return string

getManager() public method

Returns the distinguished name of the user who is the user's manager.
public getManager ( ) : string
return string

getOtherMailbox() public method

https://msdn.microsoft.com/en-us/library/ms679091(v=vs.85).aspx
public getOtherMailbox ( ) : array
return array

getPasswordLastSet() public method

Returns the time when the users password was set last.
public getPasswordLastSet ( ) : string
return string

getPasswordLastSetDate() public method

Returns the formatted timestamp of the password last set date.
public getPasswordLastSetDate ( ) : string | null
return string | null

getPasswordLastSetTimestamp() public method

Returns the password last set unix timestamp.
public getPasswordLastSetTimestamp ( ) : float | null
return float | null

getPersonalTitle() public method

Return the personal title.
public getPersonalTitle ( ) : User
return User

getPhysicalDeliveryOfficeName() public method

Returns the users physical delivery office name.

getPostalCode() public method

Returns the users postal code.
public getPostalCode ( ) : string
return string

getPrimaryGroup() public method

Retrieves the primary group of the current user.
public getPrimaryGroup ( ) : Model | boolean
return Model | boolean

getProfilePath() public method

Returns the users profile file path.
public getProfilePath ( ) : string
return string

getProxyAddresses() public method

https://msdn.microsoft.com/en-us/library/ms679424(v=vs.85).aspx
public getProxyAddresses ( ) : array
return array

getRememberToken() public method

Get the token value for the "remember me" session.
public getRememberToken ( ) : string
return string

getRememberTokenName() public method

Get the column name for the "remember me" token.
public getRememberTokenName ( ) : string
return string

getRoomNumber() public method

Returns the room number.
public getRoomNumber ( ) : string
return string

getScriptPath() public method

https://msdn.microsoft.com/en-us/library/ms679656(v=vs.85).aspx
public getScriptPath ( ) : string
return string

getShowInAddressBook() public method

Returns an array of address book DNs that the user is listed to be shown in.
public getShowInAddressBook ( ) : array
return array

getStreetAddress() public method

Returns the users street address.
public getStreetAddress ( ) : User
return User

getTelephoneNumber() public method

https://msdn.microsoft.com/en-us/library/ms680027(v=vs.85).aspx
public getTelephoneNumber ( ) : string
return string

getThumbnail() public method

Returns the users thumbnail photo.
public getThumbnail ( ) : mixed
return mixed

getThumbnailEncoded() public method

Returns the users thumbnail photo base 64 encoded.
public getThumbnailEncoded ( ) : null | string
return null | string

getTitle() public method

https://msdn.microsoft.com/en-us/library/ms680037(v=vs.85).aspx
public getTitle ( ) : string
return string

getUserAccountControl() public method

Returns the users user account control integer.
public getUserAccountControl ( ) : string
return string

getUserPrincipalName() public method

This is usually their email address. https://msdn.microsoft.com/en-us/library/ms680857(v=vs.85).aspx
public getUserPrincipalName ( ) : string
return string

isActive() public method

Return true / false if AD User is active (enabled & not expired).
public isActive ( ) : boolean
return boolean

isDisabled() public method

Returns if the user is disabled.
public isDisabled ( ) : boolean
return boolean

isEnabled() public method

Returns if the user is enabled.
public isEnabled ( ) : boolean
return boolean

isExpired() public method

Return true / false if the AD User is expired.
public isExpired ( DateTim\DateTime $date = null ) : boolean
$date DateTim\DateTime Optional date
return boolean

passwordExpired() public method

Returns true / false if the users password is expired.
public passwordExpired ( ) : boolean
return boolean

setAccountExpiry() public method

https://msdn.microsoft.com/en-us/library/ms675098(v=vs.85).aspx
public setAccountExpiry ( float $expiryTime ) : User
$expiryTime float
return User

setCompany() public method

Sets the users company.
public setCompany ( string $company ) : User
$company string
return User

setCountry() public method

Sets the users country.
public setCountry ( string $country ) : User
$country string
return User

setDepartment() public method

Sets the users department.
public setDepartment ( string $department ) : User
$department string
return User

setDepartmentNumber() public method

Sets the department number.
public setDepartmentNumber ( string $number ) : User
$number string
return User

setDisplayName() public method

Sets the users display name.
public setDisplayName ( string $displayName ) : User
$displayName string
return User

setEmail() public method

Keep in mind this will remove all other email addresses the user currently has.
public setEmail ( string $email ) : User
$email string
return User

setEmails() public method

Sets the users email addresses.
public setEmails ( array $emails = [] ) : User
$emails array
return User

setEmployeeId() public method

Sets the employee ID.
public setEmployeeId ( string $employeeId ) : User
$employeeId string
return User

setEmployeeNumber() public method

Sets the employee number.
public setEmployeeNumber ( string $number ) : User
$number string
return User

setFirstName() public method

Sets the users first name.
public setFirstName ( string $firstName ) : User
$firstName string
return User

setInfo() public method

Sets the users info.
public setInfo ( string $info ) : User
$info string
return User

setInitials() public method

Sets the users initials.
public setInitials ( string $initials ) : User
$initials string
return User

setLastName() public method

Sets the users last name.
public setLastName ( string $lastName ) : User
$lastName string
return User

setLocale() public method

Sets the users locale.
public setLocale ( string $locale ) : User
$locale string
return User

setManager() public method

Sets the distinguished name of the user who is the user's manager.
public setManager ( string $managerDn ) : User
$managerDn string
return User

setOtherMailbox() public method

Sets the users other mailboxes.
public setOtherMailbox ( array $otherMailbox = [] ) : User
$otherMailbox array
return User

setPassword() public method

Sets the password on the current user.
public setPassword ( string $password )
$password string

setPersonalTitle() public method

Sets the personal title.
public setPersonalTitle ( string $personalTitle ) : User
$personalTitle string
return User

setPhysicalDeliveryOfficeName() public method

Sets the users physical delivery office name.
public setPhysicalDeliveryOfficeName ( string $deliveryOffice ) : User
$deliveryOffice string
return User

setPostalCode() public method

Sets the users postal code.
public setPostalCode ( string $postalCode ) : User
$postalCode string
return User

setProfilePath() public method

Sets the users profile path.
public setProfilePath ( string $path ) : User
$path string
return User

setProxyAddresses() public method

This will remove all proxy addresses on the user and insert the specified addresses. https://msdn.microsoft.com/en-us/library/ms679424(v=vs.85).aspx
public setProxyAddresses ( array $addresses = [] ) : User
$addresses array
return User

setRememberToken() public method

Set the token value for the "remember me" session.
public setRememberToken ( string $value ) : void
$value string
return void

setRoomNumber() public method

Sets the room number.
public setRoomNumber ( string $number ) : User
$number string
return User

setScriptPath() public method

Sets the users script path.
public setScriptPath ( string $path ) : User
$path string
return User

setStreetAddress() public method

Sets the users street address.
public setStreetAddress ( string $address ) : User
$address string
return User

setTelephoneNumber() public method

Sets the users telephone number.
public setTelephoneNumber ( string $number ) : User
$number string
return User

setTitle() public method

Sets the users title.
public setTitle ( string $title ) : User
$title string
return User

setUserAccountControl() public method

Sets the users account control property.
public setUserAccountControl ( integer | string | AccountControl $accountControl ) : User
$accountControl integer | string | Adldap\Objects\AccountControl
return User

setUserPrincipalName() public method

Sets the users user principal name.
public setUserPrincipalName ( string $userPrincipalName ) : User
$userPrincipalName string
return User