|
@@ -158,9 +158,17 @@ class Auth
|
|
|
$this->setError('Nickname already exist');
|
|
|
return false;
|
|
|
}*/
|
|
|
- if ($email && User::getByEmail($email)) {
|
|
|
- $this->setError('Email already exist');
|
|
|
- return false;
|
|
|
+ if ($email) {
|
|
|
+ if(User::getByEmail($email)){
|
|
|
+ $this->setError('Email already exist');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ $check_coach = Db::name('coach')->where('email',$email)->find();
|
|
|
+ if(!empty($check_coach)){
|
|
|
+ $this->setError('Email already exist');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|
|
|
if ($mobile && User::getByMobile($mobile)) {
|
|
|
$this->setError('Mobile already exist');
|