mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-06 07:01:30 -04:00
move user::delete() to User_Model::delete()
This commit is contained in:
@@ -86,16 +86,6 @@ class user_Core {
|
||||
return $user;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a user
|
||||
*
|
||||
* @param string $id the user id
|
||||
*/
|
||||
static function delete($id) {
|
||||
ORM::factory("user", $id)->delete();
|
||||
module::event("user_deleted", $user);
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the password provided correct?
|
||||
*
|
||||
@@ -148,7 +138,7 @@ class user_Core {
|
||||
$user->last_login = time();
|
||||
$user->save();
|
||||
|
||||
Session::instance()->set('user', $user);
|
||||
Session::instance()->set("user", $user);
|
||||
module::event("user_login", $user);
|
||||
}
|
||||
|
||||
@@ -158,7 +148,7 @@ class user_Core {
|
||||
* @param string $salt (optional) salt or hash containing salt (randomly generated if omitted)
|
||||
* @return string hashed password
|
||||
*/
|
||||
private static function _md5Salt($password, $salt='') {
|
||||
private static function _md5Salt($password, $salt="") {
|
||||
if (empty($salt)) {
|
||||
for ($i = 0; $i < 4; $i++) {
|
||||
$char = mt_rand(48, 109);
|
||||
|
||||
Reference in New Issue
Block a user