diff options
Diffstat (limited to 'app/Model/User.php')
-rw-r--r-- | app/Model/User.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/Model/User.php b/app/Model/User.php index fd2ec954..2b6436f8 100644 --- a/app/Model/User.php +++ b/app/Model/User.php @@ -167,6 +167,18 @@ class User extends Base } /** + * Get user_id by username + * + * @access public + * @param string $username Username + * @return array + */ + public function getIdByUsername($username) + { + return $this->db->table(self::TABLE)->eq('username', $username)->findOneColumn('id'); + } + + /** * Get a specific user by the email address * * @access public |