move user::delete() to User_Model::delete()

This commit is contained in:
Bharat Mediratta
2008-12-09 00:07:26 +00:00
parent e3ad42a276
commit f69f3967ea
4 changed files with 12 additions and 17 deletions
+2 -12
View File
@@ -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);