Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (wp_validate_auth_cookie()) {
- $results = wp_parse_auth_cookie();
- $logged_in = FALSE;
- if (isset($results['username']) && isset($results['expiration'])) {
- if (time() < floatval($results['expiration'])) {
- if (($userdata = get_user_by('login', $results['username'])))
- $logged_in = $userdata->ID;
- }
- }
- if (!$logged_in) die("Login failure. -1");
- else if (!user_can($logged_in, 'NextGEN Upload images')) {
- die('You do not have permission to upload files. -2');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement