public function invalidate($id, $account) { $user = new User($id); $uinfo = $user->get(); $user->modify(array('_id' => $user->id), array('$addToSet' => array('social_invalidated' => $account))); $recipients = array($id); $this->add(array('sender' => $id, 'recipients' => $recipients, 'text' => $this->_body($this->_prefix . __FUNCTION__ . '.php', array('social' => $this->_social_account($account))), 'type' => $this->_prefix . __FUNCTION__, 'url' => Url::base('influencer/social'))); $this->mail_enqueue(array('to' => $uinfo['email'], 'from' => $this->_from_email, 'subject' => 'Social Account Invalidated', 'message' => $this->_mail_body($this->_prefix . __FUNCTION__ . '.php', array('user' => $uinfo, 'social' => $this->_social_account($account))))); }
public function activation($id, $by = null) { $user = new User($id); $uinfo = $user->get(); $binfo = null; if ($by !== null) { $buser = new User($by); $binfo = $buser->get(); } else { $by = $id; $binfo = $uinfo; } $this->mail_enqueue(array('to' => $uinfo['email'], 'from' => $this->_from_email, 'subject' => 'Account ' . ($uinfo['active'] ? 'Activated' : 'Deactivated'), 'message' => $this->_mail_body($this->_prefix . __FUNCTION__ . '.php', array('user' => $uinfo, 'by' => $binfo)))); }
public function create($data) { return parent::create(array('name' => $data['name'], 'email' => $data['email'], 'username' => $data['username'], 'password' => $data['password'], 'phone' => $data['phone'], 'city' => $data['city'], 'genre' => $data['genre'], 'type' => $this->_type, 'active' => MongoDoc::get($data, 'active', true), 'last_login' => null)); }
public function create($data) { return parent::create(array('name' => $data['name'], 'email' => $data['email'], 'username' => $data['username'], 'password' => $data['password'], 'account' => $data['account'], 'type' => $this->_type, 'active' => true, 'last_login' => null)); }
public function remove() { parent::remove(); }