Adldap\Models\User::getEmail PHP Method

getEmail() public method

https://msdn.microsoft.com/en-us/library/ms676855(v=vs.85).aspx
public getEmail ( ) : string
return string
    public function getEmail()
    {
        return $this->getFirstAttribute($this->schema->email());
    }

Usage Example

Beispiel #1
0
 /**
  * Imports an active directory user.
  *
  * @param User $user
  *
  * @return bool
  */
 public function handle(User $user)
 {
     $user = $user->where('email', $this->user->getEmail())->first();
     if (!$user instanceof User) {
         $email = $this->user->getEmail();
         $password = str_random(40);
         $fullName = $this->user->getName();
         $user = $this->dispatch(new CreateUser($email, $password, $fullName));
     }
     // Synchronize their AD attributes.
     $user->from_ad = true;
     if ($user->isDirty()) {
         // Check if there's any changed before
         // firing a save to save on inserts.
         $user->save();
     }
     return $user;
 }
All Usage Examples Of Adldap\Models\User::getEmail