public function up($params) { $_user = new Common_Db_User(); try { $user = $_user->getByName($params['uname']); } catch (Exception $e) { $user = array(); } if (isset($user['uname'])) { throw new Exception('This ID is not available, please use another one'); } $pass = md5($params['pass']); $uid = Common_Util_Uuid::create(); $user = array('uid' => $uid, 'uname' => $params['uname'], 'email' => $params['email'], 'pass' => $pass); try { $_user->insert($user); } catch (Exception $e) { throw $e; } }