function sms_user_load in SMS Framework 6.2
Same name and namespace in other branches
- 5 modules/sms_user/sms_user.module \sms_user_load()
- 6 modules/sms_user/sms_user.module \sms_user_load()
Load user mobile data into the user object.
See also
1 call to sms_user_load()
- sms_user_user in modules/
sms_user/ sms_user.module - Implmentation of hook_user().
File
- modules/
sms_user/ sms_user.module, line 426 - Provides integration between the SMS Framework and Drupal users.
Code
function sms_user_load(&$edit, &$account, $category) {
$result = db_query("SELECT number, status, code, gateway FROM {sms_user} WHERE uid = %d", $account->uid);
$account->sms_user = array();
while ($data = db_fetch_array($result)) {
$user_data = unserialize($account->data);
$account->sms_user = $user_data['sms_user'];
$account->sms_user['number'] = $data['number'];
$account->sms_user['status'] = $data['status'];
$account->sms_user['code'] = $data['code'];
$account->sms_user['gateway'] = unserialize($data['gateway']);
}
// @todo: the following is to support messaging that expect account details
// with a delta of 0
$account->sms_user[0] = $account->sms_user;
}