Beispiel #1
0
 /**
  * @param string $uid
  * @param \OC_User_Interface $backend
  * @param \OC\Hooks\Emitter $emitter
  * @param \OC\AllConfig $config
  */
 public function __construct($uid, $backend, $emitter = null, $config = null)
 {
     $this->uid = $uid;
     $this->backend = $backend;
     $this->emitter = $emitter;
     $this->config = $config;
     if ($this->config) {
         $enabled = $this->config->getUserValue($uid, 'core', 'enabled', 'true');
         $this->enabled = $enabled === 'true';
     } else {
         $this->enabled = true;
     }
     $this->lastLogin = \OC_Preferences::getValue($uid, 'login', 'lastLogin', 0);
 }
Beispiel #2
0
 /**
  * @param string $uid
  * @param \OC_User_Backend $backend
  * @param \OC\Hooks\Emitter $emitter
  * @param \OC\AllConfig $config
  */
 public function __construct($uid, $backend, $emitter = null, $config = null)
 {
     $this->uid = $uid;
     if ($backend and $backend->implementsActions(OC_USER_BACKEND_GET_DISPLAYNAME)) {
         $this->displayName = $backend->getDisplayName($uid);
     } else {
         $this->displayName = $uid;
     }
     $this->backend = $backend;
     $this->emitter = $emitter;
     $this->config = $config;
     if ($this->config) {
         $enabled = $this->config->getUserValue($uid, 'core', 'enabled', 'true');
         $this->enabled = $enabled === 'true';
     } else {
         $this->enabled = true;
     }
 }