Browse Source

fixed user edit email check

tags/0.1.0
Robin Thoni 9 years ago
parent
commit
a4b86dd2f6
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      src/Auth/Business/LuticateUsersBusiness.php

+ 2
- 0
src/Auth/Business/LuticateUsersBusiness.php View File

160
     public static function edit($user_id, $firstname, $lastname, $email)
160
     public static function edit($user_id, $firstname, $lastname, $email)
161
     {
161
     {
162
         $user = self::checkUserId($user_id);
162
         $user = self::checkUserId($user_id);
163
+        if (!filter_var($email, FILTER_VALIDATE_EMAIL))
164
+            self::badInput("Invalid email address");
163
         $user->setEmail($email);
165
         $user->setEmail($email);
164
         $user->setFirstname($firstname);
166
         $user->setFirstname($firstname);
165
         $user->setLastname($lastname);
167
         $user->setLastname($lastname);

Loading…
Cancel
Save