$identity = &Identity::singleton();
$name = $identity->getValue('fullname');
if (trim($name) == '') {
- $name = Horde_Auth::removeHook(Horde_Auth::getAuth());
+ $name = Horde_Auth::getOriginalAuth();
}
$share = &$GLOBALS['fima_shares']->newShare(Horde_Auth::getAuth());
$share->set('name', sprintf(_("%s's Ledger"), $name));
$identity = &Identity::singleton();
$name = $identity->getValue('fullname');
if (trim($name) == '') {
- $name = Horde_Auth::removeHook(Horde_Auth::getAuth());
+ $name = Horde_Auth::getOriginalAuth();
}
$ledger = &$GLOBALS['fima_shares']->newShare(Horde_Auth::getAuth());
if (is_a($ledger, 'PEAR_Error')) {
// Get user security pass
$user = Horde_Util::getFormData('username');
if ($user) {
- $u_prefs = Prefs::singleton($conf['prefs']['driver'], 'horde', Horde_Auth::addHook($user), '', null, false);
+ $u_prefs = Prefs::singleton($conf['prefs']['driver'], 'horde', Horde_Auth::convertUsername($user, true), '', null, false);
$u_prefs->retrieve();
$answer = $u_prefs->getValue('security_answer');
$question = $u_prefs->getValue('security_question');
static public function getUserEmail($user)
{
// We should always realy on registration data
- // $prefs = Prefs::singleton($GLOBALS['conf']['prefs']['driver'], 'horde', Horde_Auth::addHook($user), '', null, false);
+ // $prefs = Prefs::singleton($GLOBALS['conf']['prefs']['driver'], 'horde', Horde_Auth::convertUsername($user, true), '', null, false);
// $prefs->retrieve();
// $email = $prefs->getValue('alternate_email') ? $prefs->getValue('alternate_email') : $prefs->getValue('from_addr');
return (boolean)$GLOBALS['prefs']->getValue('friends_approval');
}
- $prefs = Prefs::singleton($GLOBALS['conf']['prefs']['driver'], 'folks', Horde_Auth::addHook($user), '', null, false);
+ $prefs = Prefs::singleton($GLOBALS['conf']['prefs']['driver'], 'folks', Horde_Auth::convertUsername($user, true), '', null, false);
$prefs->retrieve();
return (boolean)$prefs->getValue('friends_approval');
// Process owner and owner permissions.
$old_owner = $share->get('owner');
- $new_owner = Horde_Auth::addHook(Horde_Util::getFormData('owner', $old_owner));
+ $new_owner = Horde_Auth::convertUsername(Horde_Util::getFormData('owner', $old_owner), true);
if ($old_owner !== $new_owner && !empty($new_owner)) {
if ($old_owner != Horde_Auth::getAuth() && !Horde_Auth::isAdmin()) {
$notification->push(_("Only the owner or system administrator may change ownership or owner permissions for a share"), 'horde.error');
foreach ($u_names as $key => $user) {
// Apply backend hooks
- $user = Horde_Auth::addHook($user);
+ $user = Horde_Auth::convertUsername($user, true);
// If the user is empty, or we've already set permissions
// via the owner_ options, don't do anything here.
if (empty($user) || $user == $new_owner) {
/* Determine the unique user name. */
if (Horde_Auth::getAuth()) {
- $_SESSION['imp']['uniquser'] = Horde_Auth::removeHook(Horde_Auth::getAuth());
+ $_SESSION['imp']['uniquser'] = Horde_Auth::getOriginalAuth();
} else {
$_SESSION['imp']['uniquser'] = $credentials['userId'];
if (!empty($ptr['realm'])) {
$identity = &Identity::singleton();
$name = $identity->getValue('fullname');
if (trim($name) == '') {
- $name = Horde_Auth::removeHook(Horde_Auth::getAuth());
+ $name = Horde_Auth::getOriginalAuth();
}
$share = &$GLOBALS['ingo_shares']->newShare($signature);
$share->set('name', $name);
$identity = &Identity::singleton();
$name = $identity->getValue('fullname');
if (trim($name) == '') {
- $name = Horde_Auth::removeHook(Horde_Auth::getAuth());
+ $name = Horde_Auth::getOriginalAuth();
}
$calendar = &$GLOBALS['kronolith_shares']->newShare(Horde_Auth::getAuth());
if (is_a($calendar, 'PEAR_Error')) {
foreach ($GLOBALS['all_calendars'] as $id => $calendar) {
$owner = $calendar->get('owner') == Horde_Auth::getAuth();
$code['conf']['calendars']['internal'][$id] = array(
- 'name' => ($owner ? '' : '[' . Horde_Auth::removeHook($calendar->get('owner')) . '] ')
+ 'name' => ($owner ? '' : '[' . Horde_Auth::convertUsername($calendar->get('owner'), false) . '] ')
. $calendar->get('name'),
'owner' => $owner,
'fg' => self::foregroundColor($calendar),
$identity = &Identity::singleton();
$name = $identity->getValue('fullname');
if (trim($name) == '') {
- $name = Horde_Auth::removeHook(Horde_Auth::getAuth());
+ $name = Horde_Auth::getOriginalAuth();
}
$share = &$GLOBALS['kronolith_shares']->newShare(Horde_Auth::getAuth());
$share->set('name', sprintf(_("%s's Calendar"), $name));
// Process owner and owner permissions.
$old_owner = $share->get('owner');
- $new_owner = Horde_Auth::addHook(Horde_Util::getFormData('owner_select', Horde_Util::getFormData('owner_input', $old_owner)));
+ $new_owner = Horde_Auth::convertUsername(Horde_Util::getFormData('owner_select', Horde_Util::getFormData('owner_input', $old_owner)), true);
if ($old_owner !== $new_owner && !empty($new_owner)) {
if ($old_owner != Horde_Auth::getAuth() && !Horde_Auth::isAdmin()) {
$notification->push(_("Only the owner or system administrator may change ownership or owner permissions for a share"), 'horde.error');
} elseif ($auth->hasCapability('list') && !$auth->exists($new_owner)) {
- $notification->push(sprintf(_("The user \"%s\" does not exist."), Auth::removeHook($new_owner)), 'horde.error');
+ $notification->push(sprintf(_("The user \"%s\" does not exist."), Auth::convertUsername($new_owner, false)), 'horde.error');
} else {
$share->set('owner', $new_owner);
$share->save();
foreach ($u_names as $key => $user) {
// Apply backend hooks
- $user = Horde_Auth::addHook($user);
+ $user = Horde_Auth::convertUsername($user, true);
// If the user is empty, or we've already set permissions
// via the owner_ options, don't do anything here.
if (empty($user) || $user == $new_owner) {
continue;
}
if ($auth->hasCapability('list') && !$auth->exists($user)) {
- $notification->push(sprintf(_("The user \"%s\" does not exist."), Auth::removeHook($user)), 'horde.error');
+ $notification->push(sprintf(_("The user \"%s\" does not exist."), Auth::convertUsername($user, false)), 'horde.error');
continue;
}
<h4><?php echo _("Shared Calendars:") ?></h4>
<ul id="sharedcalendars">
<?php foreach ($shared_calendars as $id => $cal): ?>
- <li<?php echo Kronolith::getCSSColors($cal) ?>><label><input type="checkbox" class="checkbox" name="display_cal[]" value="<?php echo htmlspecialchars($id) ?>"<?php echo (in_array($id, $display_calendars) ? ' checked="checked"' : '') . ' /> [' . htmlspecialchars(Horde_Auth::removeHook($cal->get('owner'))) . '] ' . htmlspecialchars($cal->get('name')) ?></label> <?php echo $info_img ?></li>
+ <li<?php echo Kronolith::getCSSColors($cal) ?>><label><input type="checkbox" class="checkbox" name="display_cal[]" value="<?php echo htmlspecialchars($id) ?>"<?php echo (in_array($id, $display_calendars) ? ' checked="checked"' : '') . ' /> [' . htmlspecialchars(Horde_Auth::convertUsername($cal->get('owner'), false)) . '] ' . htmlspecialchars($cal->get('name')) ?></label> <?php echo $info_img ?></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
<label for="owner_select" class="hidden"><?php echo _("Owner:") ?></label>
<select id="owner_select" name="owner_select">
<option value=""><?php echo _("Select a new owner:") ?></option>
- <option value="<?php echo htmlspecialchars(Horde_Auth::removeHook($owner)) ?>" selected="selected"><?php echo htmlspecialchars(Horde_Auth::removeHook($owner)) ?></option>
-<?php foreach ($userList as $user) { if ($user != Horde_Auth::removeHook($owner)) { ?>
+ <option value="<?php echo htmlspecialchars(Horde_Auth::convertUsername($owner, false)) ?>" selected="selected"><?php echo htmlspecialchars(Horde_Auth::convertUsername($owner, false)) ?></option>
+<?php foreach ($userList as $user) { if ($user != Horde_Auth::convertUsername($owner, false)) { ?>
<option value="<?php echo htmlspecialchars($user) ?>"><?php echo htmlspecialchars($user) ?></option>
<?php } } ?>
</select>
<?php else: ?>
<label for="owner_input" class="hidden"><?php echo _("Owner:") ?></label>
- <input type="text" id="owner_input" name="owner_input" value="<?php echo htmlspecialchars(Horde_Auth::removeHook($owner)) ?>" />
+ <input type="text" id="owner_input" name="owner_input" value="<?php echo htmlspecialchars(Horde_Auth::convertUsername($owner, false)) ?>" />
<?php endif; ?>
</td>
</tr>
<?php
foreach ($userperms as $user => $uperm) {
if ($user != $owner) {
- $user = Horde_Auth::removeHook($user);
+ $user = Horde_Auth::convertUsername($user, false);
?>
<tr>
<td class="light"><?php echo htmlspecialchars($user) ?><input type="hidden" name="u_names[<?php echo htmlspecialchars($user) ?>]" value="<?php echo htmlspecialchars($user) ?>" /></td>
<option value=""><?php echo _("Select a user to add:") ?></option>
<?php
foreach ($userList as $user) {
- if (!isset($userperms[Horde_Auth::addHook($user)]) &&
- $user != Horde_Auth::removeHook($owner)) {
+ if (!isset($userperms[Horde_Auth::convertUsername($user, true)]) &&
+ $user != Horde_Auth::convertUsername($owner, false)) {
?>
<option value="<?php echo htmlspecialchars($user) ?>"><?php echo htmlspecialchars($user) ?></option>
<?php } } ?>
$identity = &Identity::singleton();
$name = $identity->getValue('fullname');
if (trim($name) == '') {
- $name = Horde_Auth::removeHook(Horde_Auth::getAuth());
+ $name = Horde_Auth::getOriginalAuth();
}
$tasklist = &$GLOBALS['nag_shares']->newShare(Horde_Auth::getAuth());
if (is_a($tasklist, 'PEAR_Error')) {
$identity = Identity::singleton();
$name = $identity->getValue('fullname');
if (trim($name) == '') {
- $name = Horde_Auth::removeHook(Horde_Auth::getAuth());
+ $name = Horde_Auth::getOriginalAuth();
}
$share = $GLOBALS['nag_shares']->newShare(Horde_Auth::getAuth());
$share->set('name', sprintf(_("%s's Task List"), $name));
$identity = Identity::singleton('none', $tasklist->get('owner'));
$owner_name = $identity->getValue('fullname');
if (trim($owner_name) == '') {
- $owner_name = Horde_Auth::removeHook(Horde_Auth::getAuth());
+ $owner_name = Horde_Auth::getOriginalAuth();
}
<h4><?php echo _("Shared Task Lists:") ?></h4>
<ul id="sharedtasklists">
<?php foreach ($shared_tasklists as $id => $tl): ?>
- <li><label><input type="checkbox" class="checkbox" name="display_tasklist[]" value="<?php echo htmlspecialchars($id) ?>"<?php echo (in_array($id, $display_tasklists) ? ' checked="checked"' : '') . ' /> [' . htmlspecialchars(Horde_Auth::removeHook($tl->get('owner'))) . '] ' . htmlspecialchars($tl->get('name')) ?></label> <?php echo $info_img ?></li>
+ <li><label><input type="checkbox" class="checkbox" name="display_tasklist[]" value="<?php echo htmlspecialchars($id) ?>"<?php echo (in_array($id, $display_tasklists) ? ' checked="checked"' : '') . ' /> [' . htmlspecialchars(Horde_Auth::convertUsername($tl->get('owner'), false)) . '] ' . htmlspecialchars($tl->get('name')) ?></label> <?php echo $info_img ?></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
<h4><?php echo _("Shared Classes:") ?></h4>
<ul id="sharedclasses">
<?php foreach ($shared_classes as $id => $cl): ?>
- <li><label><input type="checkbox" class="checkbox" name="display_class[]" value="<?php echo htmlspecialchars($id) ?>"<?php echo (in_array($id, $display_classes) ? ' checked="checked"' : '') . ' /> [' . htmlspecialchars(Horde_Auth::removeHook($cl->get('owner'))) . '] ' . htmlspecialchars($cl->get('name')) ?></label></li>
+ <li><label><input type="checkbox" class="checkbox" name="display_class[]" value="<?php echo htmlspecialchars($id) ?>"<?php echo (in_array($id, $display_classes) ? ' checked="checked"' : '') . ' /> [' . htmlspecialchars(Horde_Auth::convertUsername($cl->get('owner'), false)) . '] ' . htmlspecialchars($cl->get('name')) ?></label></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
$identity = Identity::singleton();
$name = $identity->getValue('fullname');
if (trim($name) == '') {
- $name = Horde_Auth::removeHook(Horde_Auth::getAuth());
+ $name = Horde_Auth::getOriginalAuth();
}
$name = sprintf(_("%s's Address Book"), $name);
} else {