All pastes #366633 Raw Edit

Untitled

public text v1 · immutable
#366633 ·published 2007-02-21 20:18 UTC
rendered paste body
/* 
 * Returns the user id of the last user inserted by the billing system. Uses $this->username to know. 
 * If it can not find anything on the DB, returns null. This function wraps get_id_from_username()      *
 * @return int id
 */

function getCompUserId() {
    if (is_numeric($this->userId)) {
        return $this->userId;
    }                        
    
    if (!empty($this->username)) {
        return (int)get_id_from_username($this->username);            
    }                      
    
    return false;
}