Project

General

Profile

« Previous | Next » 

Revision 3f109700

Added by Jim Pingle almost 14 years ago

Sort user privileges so dashboard/index.php come first, so if a user has those permissions, they get redirected there first and not to another page.

View differences:

etc/inc/priv.inc
287 287
	return $allowed_pages;
288 288
}
289 289

  
290
function sort_user_privs($privs) {
291
	// Privileges to place first, to redirect properly.
292
	$priority_privs = array("page-dashboard-all", "page-system-login/logout");
293

  
294
	$fprivs = array_intersect($privs, $priority_privs);
295
	$sprivs  = array_diff($privs, $priority_privs);
296

  
297
	return array_merge($fprivs, $sprivs);
298
}
290 299
?>

Also available in: Unified diff