Ejemplo n.º 1
0
 public static function getUserIdByUsername($usename)
 {
     $model = new \common\models\User();
     $userId = $model->findIdByUsername($usename);
     if (!empty($userId)) {
         return $userId->id;
     } else {
         return '';
     }
 }