コード例 #1
0
ファイル: webusers.php プロジェクト: ryzom/ryzomcore
 /**
  * update the emailaddress.
  * update the emailaddress in the shard + update the emailaddress in the www/CMS version.
  * @param $user the username
  * @param $mail the new emailaddress.
  * @return ok if it worked, if the lib or shard is offline it will return liboffline or shardoffline.
  */
 public static function setEmail($user, $mail)
 {
     $reply = WebUsers::setAmsEmail($user, $mail);
     $values = array('user' => $user, 'mail' => $mail);
     try {
         //make connection with and put into shard db
         db_query("UPDATE {users} SET mail = :mail WHERE name = :user", $values);
     } catch (PDOException $e) {
         //ERROR: the web DB is offline
     }
     return $reply;
 }
コード例 #2
0
ファイル: webusers.php プロジェクト: cls1991/ryzomcore
 /**
  * update the emailaddress.
  * update the emailaddress in the shard + update the emailaddress in the www/CMS version.
  * @param $user the username
  * @param $mail the new emailaddress.
  * @return ok if it worked, if the lib or shard is offline it will return liboffline or shardoffline.
  */
 public static function setEmail($user, $mail)
 {
     $reply = WebUsers::setAmsEmail($user, $mail);
     $values = array('Email' => $mail);
     try {
         //make connection with and put into shard db
         $dbw = new DBLayer("web");
         $dbw->update("ams_user", $values, "Login = '******'");
     } catch (PDOException $e) {
         //ERROR: the web DB is offline
     }
     return $reply;
 }