Changeset 1220


Ignore:
Timestamp:
02/23/10 12:03:23 (3 years ago)
Author:
nick_ramsay
Message:

[Branch 1.2] User Signin 0.2 - throws out killspammed, banned or suspended users when checking the cookie.

Location:
branches/1.2/content/plugins/user_signin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/content/plugins/user_signin/readme.txt

    r906 r1220  
    1515Changelog 
    1616--------- 
     17v.0.2 2010/02/23 - Nick - Throws out killspammed, banned or suspended users when checking the cookie 
    1718v.0.1 2009/12/27 - Nick - Released first version 
  • branches/1.2/content/plugins/user_signin/user_signin.php

    r1112 r1220  
    33 * name: User Signin 
    44 * description: Provides user registration and login 
    5  * version: 0.1 
     5 * version: 0.2 
    66 * folder: user_signin 
    77 * type: signin 
     
    655655        return true; 
    656656    } 
     657     
     658     
     659     /** 
     660     * Check login permission during cookie check 
     661     * 
     662     * @return true; 
     663     */ 
     664    public function userauth_checkcookie_success() 
     665    { 
     666        $fail_array = array('killspammed', 'banned', 'suspended'); 
     667        if (!in_array($h->currentUser->role, $fail_array)) { echo "SAFE!"; return true; } 
     668         
     669        if ($h->currentUser->getPermission('can_login') == 'no') { 
     670            $h->currentUser->destroyCookieAndSession(); 
     671            $h->currentUser->setLoggedOutUser($h); 
     672            header("Location: " . BASEURL); 
     673            exit; 
     674        } 
     675         
     676    } 
    657677} 
    658678 
Note: See TracChangeset for help on using the changeset viewer.