Skip to content
GitLab
Explore
Sign in
Commits on Source (2)
Move the sucsunreadmail script to the plugins folder from my home dir
· feafd46c
Imran Hussain
authored
Sep 14, 2015
feafd46c
Merge branch 'master' of projects.sucs.org:sucssite/sucs-site
· a4206f63
Imran Hussain
authored
Sep 14, 2015
a4206f63
Hide whitespace changes
Inline
Side-by-side
lib/session.php
View file @
a4206f63
...
...
@@ -227,7 +227,7 @@ private $datahash=''; // hash of data field
}*/
// a sure-fire way to check to see if the user has any unread email
// the bash script returns 0 for no and 1 for yes, takes one arg, username
$this
->
email
=
shell_exec
(
"
/home/member/imranh/bin
/sucsunreadmail
$user
"
);
$this
->
email
=
shell_exec
(
"
../plugins
/sucsunreadmail
$user
"
);
if
(
file_exists
(
$info
[
'homedirectory'
][
0
]
.
"/.forward"
))
{
$forward
=
file
(
$info
[
'homedirectory'
][
0
]
.
"/.forward"
);
...
...
plugins/sucsunreadmail
0 → 100755
View file @
a4206f63
#!/bin/bash
if
finger
-m
$1
|
grep
"New mail"
&> /dev/null
then
echo
"1"
else
echo
"0"
fi
\ No newline at end of file