本文整理汇总了PHP中thebuggenie\core\entities\tables\Users类的典型用法代码示例。如果您正苦于以下问题:PHP Users类的具体用法?PHP Users怎么用?PHP Users使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Users类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _initialize
protected function _initialize()
{
parent::_setup(self::B2DBNAME, self::ID);
parent::_addForeignKeyColumn(self::PROJECT_ID, Projects::getTable());
parent::_addForeignKeyColumn(self::USER_ID, Users::getTable());
parent::_addForeignKeyColumn(self::ROLE_ID, ListTypes::getTable());
}
示例2: _initialize
protected function _initialize()
{
parent::_setup(self::B2DBNAME, self::ID);
parent::_addBoolean(self::CONFIRMED);
parent::_addForeignKeyColumn(self::USER_ID, Users::getTable(), Users::ID);
parent::_addForeignKeyColumn(self::GROUP_ID, Groups::getTable(), Groups::ID);
}
示例3: _initialize
protected function _initialize()
{
parent::_setup(self::B2DBNAME, self::ID);
parent::_addInteger(self::TARGET, 10);
parent::_addInteger(self::VOTE, 2);
parent::_addForeignKeyColumn(self::UID, Users::getTable(), Users::ID);
}
示例4: _initialize
protected function _initialize()
{
parent::_setup(self::B2DBNAME, self::ID);
parent::_addForeignKeyColumn(self::UID, Users::getTable(), Users::ID);
parent::_addForeignKeyColumn(self::ISSUE_ID, Issues::getTable(), Issues::ID);
parent::_addForeignKeyColumn(self::FILE_ID, Files::getTable(), Files::ID);
parent::_addInteger(self::ATTACHED_AT, 10);
}
示例5: _initialize
protected function _initialize()
{
parent::_setup(self::B2DBNAME, self::ID);
parent::_addForeignKeyColumn(self::UID, \thebuggenie\core\entities\tables\Users::getTable(), \thebuggenie\core\entities\tables\Users::ID);
parent::_addForeignKeyColumn(self::ARTICLE_ID, Articles::getTable(), Articles::ID);
parent::_addForeignKeyColumn(self::FILE_ID, \thebuggenie\core\entities\tables\Files::getTable(), \thebuggenie\core\entities\tables\Files::ID);
parent::_addInteger(self::ATTACHED_AT, 10);
}
示例6: _initialize
protected function _initialize()
{
parent::_setup(self::B2DBNAME, self::ID);
parent::_addVarchar(self::IDENTITY, 300);
parent::_addVarchar(self::IDENTITY_HASH, 300);
parent::_addVarchar(self::EMAIL, 300);
parent::_addVarchar(self::TYPE, 300);
parent::_addForeignKeyColumn(self::UID, Users::getTable(), Users::ID);
}
示例7: _initialize
protected function _initialize()
{
parent::_setup(self::B2DBNAME, self::ID);
parent::_addVarchar(self::URL, 300);
parent::_addInteger(self::LINK_ORDER, 3);
parent::_addVarchar(self::TARGET_TYPE, 30);
parent::_addInteger(self::TARGET_ID, 10);
parent::_addVarchar(self::DESCRIPTION, 100, '');
parent::_addForeignKeyColumn(self::UID, Users::getTable(), Users::ID);
}
示例8: _parse_mention
protected function _parse_mention($matches)
{
$user = \thebuggenie\core\entities\tables\Users::getTable()->getByUsername($matches[1]);
if ($user instanceof \thebuggenie\core\entities\User) {
$output = framework\Action::returnComponentHTML('main/userdropdown_inline', array('user' => $matches[1], 'displayname' => $matches[0]));
$this->mentions[$user->getID()] = $user;
} else {
$output = $matches[0];
}
return $output;
}
示例9: _initialize
protected function _initialize()
{
parent::_setup(self::B2DBNAME, self::ID);
parent::_addVarchar(self::ARTICLE_NAME, 255);
parent::_addText(self::OLD_CONTENT, false);
parent::_addText(self::NEW_CONTENT, false);
parent::_addVarchar(self::REASON, 255);
parent::_addInteger(self::DATE, 10);
parent::_addInteger(self::REVISION, 10);
parent::_addForeignKeyColumn(self::AUTHOR, \thebuggenie\core\entities\tables\Users::getTable(), \thebuggenie\core\entities\tables\Users::ID);
}
示例10: _initialize
protected function _initialize()
{
parent::_setup(self::B2DBNAME, self::ID);
parent::_addForeignKeyColumn(self::ISSUE_ID, Issues::getTable(), Issues::ID);
parent::_addForeignKeyColumn(self::EDITED_BY, Users::getTable(), Users::ID);
parent::_addInteger(self::EDITED_AT, 10);
parent::_addInteger(self::ESTIMATED_MONTHS, 10);
parent::_addInteger(self::ESTIMATED_WEEKS, 10);
parent::_addInteger(self::ESTIMATED_DAYS, 10);
parent::_addInteger(self::ESTIMATED_HOURS, 10);
parent::_addFloat(self::ESTIMATED_POINTS);
}
示例11: _initialize
protected function _initialize()
{
parent::_setup(self::B2DBNAME, self::ID);
parent::_addVarchar(self::PERMISSION_TYPE, 100);
parent::_addVarchar(self::TARGET_ID, 200, 0);
parent::_addBoolean(self::ALLOWED);
parent::_addVarchar(self::MODULE, 50);
parent::_addForeignKeyColumn(self::UID, Users::getTable());
parent::_addForeignKeyColumn(self::GID, Groups::getTable());
parent::_addForeignKeyColumn(self::TID, Teams::getTable());
parent::_addForeignKeyColumn(self::ROLE_ID, ListTypes::getTable());
}
示例12: componentUserdropdown
public function componentUserdropdown()
{
framework\Logging::log('user dropdown component');
$this->rnd_no = rand();
try {
if (!$this->user instanceof entities\User) {
framework\Logging::log('loading user object in dropdown');
if (is_numeric($this->user)) {
$this->user = tables\Users::getTable()->getByUserId($this->user);
} else {
$this->user = tables\Users::getTable()->getByUsername($this->user);
}
framework\Logging::log('done (loading user object in dropdown)');
}
} catch (\Exception $e) {
}
$this->show_avatar = isset($this->show_avatar) ? $this->show_avatar : true;
framework\Logging::log('done (user dropdown component)');
}
示例13: runAuthenticate
public function runAuthenticate(framework\Request $request)
{
$username = trim($request['username']);
$password = trim($request['password']);
if ($username) {
$user = tables\Users::getTable()->getByUsername($username);
if ($password && $user instanceof entities\User) {
foreach ($user->getApplicationPasswords() as $app_password) {
if (!$app_password->isUsed()) {
if ($app_password->getHashPassword() == entities\User::hashPassword($password, $user->getSalt())) {
$app_password->useOnce();
$app_password->save();
return $this->renderJSON(array('token' => $app_password->getHashPassword()));
}
}
}
}
}
$this->getResponse()->setHttpStatus(400);
return $this->renderJSON(array('error' => 'Incorrect username or application password'));
}
示例14: _initialize
protected function _initialize()
{
parent::_setup(self::B2DBNAME, self::ID);
parent::_addForeignKeyColumn(self::UID, Users::getTable());
parent::_addForeignKeyColumn(self::TID, Teams::getTable());
}
示例15: runFilterFindUsers
public function runFilterFindUsers(framework\Request $request)
{
$filter = $request['filter'];
$filterkey = $request['filterkey'];
$existing_users = $request['existing_id'];
if (strlen($filter) < 3) {
return $this->renderJSON(array('results' => '<li>' . $this->getI18n()->__('Please enter 3 characters or more') . '</li>'));
}
$users = tables\Users::getTable()->getByDetails($filter, 10);
foreach ($existing_users as $id) {
if (isset($users[$id])) {
unset($users[$id]);
}
}
return $this->renderJSON(array('results' => $this->getComponentHTML('search/filterfindusers', compact('users', 'filterkey'))));
}